Hi,

I am writing this in a wrong way, can someone please correct me?

> A <- matrix()
> length(A) <- 6
> dim(A) <- c(3,2)
> colnames(A) <- c("X","Y")
> A
      X  Y
[1,] NA NA
[2,] NA NA
[3,] NA NA
> A$X
Error in A$X : $ operator is invalid for atomic vectors
>

Thanks,
cruz

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to