How to confuse a programmer in the R programming language. Why does this happen when you extract only one column from your data frame?
R code of this video:
df <- data.frame(x1 = 1:4,
x2 = letters[4:1],
x3 = 5:2)
df
df[ , c(1, 3)]
df[ , 1]
Follow me on Social Media:
Facebook – Statistics Globe Page: www.facebook.com/statisticsglobecom/
Facebook – R Programming Group for Discussions & Questions: www.facebook.com/groups/statisticsglobe
Facebook – Python Programming Group for Discussions & Questions: www.facebook.com/groups/statisticsglobepython
LinkedIn – Statistics Globe Page: www.linkedin.com/company/statisticsglobe/
LinkedIn – R Programming Group for Discussions & Questions: www.linkedin.com/groups/12555223/
LinkedIn – Python Programming Group for Discussions & Questions: www.linkedin.com/groups/12673534/
Twitter: twitter.com/JoachimSchork
Instagram: www.instagram.com/statisticsglobecom/
TikTok: www.tiktok.com/@statisticsglobe
コメント