Copies a specified number of lines from the beginning of a file in HDFS.
The name of a file in HDFS. The file name can include a path that is either absolute or relative to the current path.
The number of lines to retrieve from the file. The default is 10.
This example returns the first two lines of ontime_R:
R> hdfs.head('ontime_R', 2)
[1] "\"\",\"YEAR\",\"MONTH\",\"MONTH2\",\"DAYOFMONTH\",\"DAYOFMONTH2\",\"DAYOFWEEK\",\"DEPTIME\",\"CRSDEPTIME\",\"ARRTIME\",\"CRSARRTIME\",\"UNIQUECARRIER\",\"FLIGHTNUM\",\"TAILNUM\",\"ACTUALELAPSEDTIME\",\"CRSELAPSEDTIME\",\"AIRTIME\",\"ARRDELAY\",\"DEPDELAY\",\"ORIGIN\",\"DEST\",\"DISTANCE\",\"TAXIIN\",\"TAXIOUT\",\"CANCELLED\",\"CANCELLATIONCODE\",\"DIVERTED\""
[2] "\"1\",1994,8,\"M08\",2,\"D02\",2,840,840,1126,1130,\"NW\",878,NA,106,110,NA,-4,0,\"MEM\",\"TPA\",656,NA,NA,0,NA,\"0\""