0

I used the head function with the head dataset[,head("column")]. But this displays all the rows in column 1 not just few.

Thanks for your help

Tote
  • 13
  • 4
  • You could do `head(dataset)[,1]` to see the first few values of the first column. – DaveArmstrong Jan 31 '21 at 00:22
  • You can also easily isolate the rows/columns you want to see. e.g. `dataset[1:3, c(2,5,6)]` will print to console columns 2, 5, 6 of rows 1, 2, 3. – SteveM Jan 31 '21 at 00:54
  • Also, `head("column")` results in `"column"`. So what you were really doing was `dataset[, "column"]` which returns a vector of `column` – Cole Jan 31 '21 at 01:16

0 Answers0