Creating tables

Hi,
I need help in creating a table for the below data set using the basic package
Screen Shot 2020-10-29 at 9.57.39 pm

into this in terms of height
Screen Shot 2020-10-29 at 9.57.54 pm

so far the code I've typed is

X <- read.table("A4.csv", header = TRUE, sep = ",", stringsAsFactors = FALSE)
#Laying the data in a table
Y <- table(X$height, X$gender)
print(Y)

which does not work.
Any help will be appreciated.
Thanks

As a beginner to R you may benefit from studying this useful book.

Particularly chapter 5

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.