First of all, read the help file ?data.frame. What you do is adding a
variable row.names, column.names and title to your dataframe. What you
want to do is set the rownames and colnames.
> results <- data.frame(matrix(c(1,2,3,4),nrow=2,ncol=2))
> rownames(results) <- c("a","b")
> colnames(results
Sir,
I want to export the results of R in a data frame. So I want to give
rownames,columnnames & title to the data-frame.I have applied the following:
data.frame(matrix(c(...),nrow=,ncol=),row.names=c("a","b"),col.names=c("c","d"),title="aaa")
But, it does not work.
Can you help me?
Regards,
S
2 matches
Mail list logo