Тёмный

Use Data Frame Row Index as X-Variable in ggplot2 Plot in R (Example) | nrow() Function & : Operator 

Statistics Globe
Подписаться 30 тыс.
Просмотров 363
50% 1

How to use data frame row indices as x-values in a ggplot2 plot in the R programming language. More details: statisticsglob...
R code of this video:
data <- data.frame(y = c(1, 5, 4, 6, 5, 7)) # Create example data frame
data # Print example data frame
install.packages("ggplot2") # Install & load ggplot2 package
library("ggplot2")
ggplot(data, # Draw ggplot2 barplot
aes(x = 1:nrow(data),
y = y)) +
geom_col()
Follow me on Social Media:
Facebook - Statistics Globe Page: / statisticsglobecom
Facebook - R Programming Group for Discussions & Questions: / statisticsglobe
Facebook - Python Programming Group for Discussions & Questions: / statisticsglobepython
LinkedIn - Statistics Globe Page: / statisticsglobe
LinkedIn - R Programming Group for Discussions & Questions: / 12555223
LinkedIn - Python Programming Group for Discussions & Questions: / 12673534
Twitter: / joachimschork
Music by bensound.com

Опубликовано:

 

13 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@georgiosvovas7336
@georgiosvovas7336 Год назад
Clear and to the point as always. Thanks!
@matthias.statisticsglobe
@matthias.statisticsglobe Год назад
That's great to hear, Georgios! Thanks you so much for the kind feedback!
@santosh6148
@santosh6148 Год назад
Nice
@matthias.statisticsglobe
@matthias.statisticsglobe Год назад
Glad you like it Santosh!
Далее
ТИПИЧНОЕ ПОВЕДЕНИЕ МАМЫ
00:21
Просмотров 718 тыс.
Мои нет в ЛАПКЕРАХ
00:11
Просмотров 297 тыс.
R programming for ABSOLUTE beginners
14:13
Просмотров 408 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 809 тыс.
Learn R in 39 minutes
38:56
Просмотров 705 тыс.