1
da=read.table("m-ibm6708.txt",header=T) #<== Load data with header
#<== Check dimension of the data (row = sample size, col = variables)
###############502 rows, col 1 = date, col 2 = ibm, col 3 = sprtn
#<== Print out the first 6 rows of the data object "da".
printrows <- da[1:6]
printrows
打印行不起作用。我嘗試了一堆東西。我認爲它可能會使用cbind。 da是一張大桌子,但我只需要顯示前6行。如何在R Studio中的read.table中打印一定數量的行
你可以使用'head'函數:'head(da,6)' – jdharrison 2014-09-04 00:22:20
謝謝你們的幫助! – user3553260 2014-09-04 03:28:35