I rarely look at the entire dataset in R. When I do this, I try to push it to the CSV, and then use the spreadsheet to view it. To just view the output in short pieces, I use head() or tail()
Of course, my colleagues asked me if Iβm tail(head)) (yes, the head in the tail is joking, it never gets old for me)
If you want to look only at the vector, you can do this:
system("more", input=as.character(rnorm(1000)))
This does not work very well with data frames or matrices, because a character vector is required for the input parameter.
change
for data frames and matrices, you can combine my "export to CSV" and the command line function more as follows:
myDF <- data.frame(a=rnorm(1000), b=rnorm(1000)) more <- function(dataFrame) { myTempFile <- tempfile() write.csv(dataFrame, file=myTempFile, row.names = F) system(paste("more", myTempFile)) } more(myDF)
Jd long
source share