[R] How to avoid "$ operator is invalid for atomic vectors" Thu Nov 6 19:04:49 CET 2008

2013-09-29 Thread Bruce Petrovics
Thanks for your R help, posted at https://stat.ethz.ch/pipermail/r-help/2008-November/179050.html I also found this very helpful at http://stackoverflow.com/questions/11105234/filtering-out-rows-in-a-matrix-containing-only-0-in-r: Filtering out rows in a matrix containing only 0 in R

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread Patrick Burns
cruz wrote: Thanks for all the responses, they are all very helpful:) you don't need to assign dimension or classes to your objects. It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with data, the dimens

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread John Kane
Does this help (mylist <- list(NULL)) (mylist[[3]] <- data.frame(a=1:4, b=letters[1:4])) mylist (mylist[[2]] <- matrix(1:12, nrow=4)) mylist --- On Thu, 11/6/08, cruz <[EMAIL PROTECTED]> wrote: > From: cruz <[EMAIL PROTECTED]> > Subject: Re: [R] How to avoid

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread Jeffrey Horner
cruz wrote on 11/06/2008 12:16 PM: Thanks for all the responses, they are all very helpful:) you don't need to assign dimension or classes to your objects. It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with d

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread cruz
> > Does that answer your question? > Thanks:) I received one from Erin: x <- NULL __ 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 provi

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread cruz
Thanks for all the responses, they are all very helpful:) > you don't need to assign dimension or classes to your objects. > It's easier if you do like this this is something that really bothers me, when I need to define an object which i will later fill with data, the dimension of this object s

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of anna freni > sterrantino > Sent: Thursday, November 06, 2008 10:00 AM > To: cruz; r-help@r-project.org > Subject: Re: [R] How to avoid "$ operator is invalid for > atomi

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread anna freni sterrantino
_ Da: cruz <[EMAIL PROTECTED]> A: r-help@r-project.org Inviato: Giovedì 6 novembre 2008, 17:22:42 Oggetto: [R] How to avoid "$ operator is invalid for atomic vectors" Hi, I am writing this in a wrong way, can someone please correct me? > A <- matrix() > length(A)

Re: [R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread Erik Iverson
Hello - cruz wrote: 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 A[, "X"] may be what

[R] How to avoid "$ operator is invalid for atomic vectors"

2008-11-06 Thread cruz
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 _