joinos
February 7, 2020, 3:49pm
1
Please ask your questions about R Markdown here.
hei <- c(1,2,3,4,5)
wei <- c(2,4,6,8,10)
df <- data.frame(wei,hei)
class(df) # data.frame
head(df) # no result
View(df) # display data.frame df with another tab
How can view dataset with using head() of which data type is frame data
joinos:
hei <- c(1,2,3,4,5) wei <- c(2,4,6,8,10) df <- data.frame(wei,hei) class(df) # data.frame head(df) # no result View(df) # display data.frame df with another tab
Your example works , including head, when I run it in a fresh session.
if you type into console
getAnywhere(head)
does it find for you anything other than package:utils and namespace:utils ? ...Maybe you have had your head function overidden in some way.
joinos
February 8, 2020, 12:41am
3
Thanks, I 've learned many things from your comments...
head(iris) # no result...
head(as.matrix(iris)) # can see the result... thanks
dt <- as.data.table(iris)
str(dt)
head(dt) # no result
I will study more thanks
system
Closed
February 29, 2020, 12:41am
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.