On 2010-07-22 10:43, Wu Gong wrote:
Hi William,
I'm curious about that you used d[]<- lapply(d, factor...
Could you please tell me if there are any differences between d[] and d?
Thank you.
Why not try it both ways and inspect the result.
d[] <-
d <-
Obvious?
-Peter Ehlers
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Wu Gong
> Sent: Thursday, July 22, 2010 9:44 AM
> To: r-help@r-project.org
> Subject: Re: [R] how to force a table to be square?
>
>
> Hi William,
Hi William,
I'm curious about that you used d[] <- lapply(d, factor...
Could you please tell me if there are any differences between d[] and d?
Thank you.
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298965.html
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Liat
> Sent: Thursday, July 22, 2010 8:41 AM
> To: r-help@r-project.org
> Subject: Re: [R] how to force a table to be square?
>
>
> Thanks Peter!
>
Thank you!!!
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298876.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
Thanks Peter!
that worked, and was so easy. LOL.
I tried playing with factor and levels before I wrote here, but obviously I
didn't do it right.
Thanks again,
Liat.
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298875.html
Sent from t
Hi, try ?levels
myData <- matrix(sample(c(LETTERS[1:10],NA),100,replace=T),nrow=25)
table(factor(as.vector(myData),levels=LETTERS[1:26]),useNA="ifany")
-
A R learner.
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-square-tp2298707p2298833.html
Se
On Jul 22, 2010, at 4:00 PM, Liat wrote:
>
> Hi guys,
> I hope you can help me with this.
> Here is the problem:
> I have some data (myData) that looks similar to this:
>
> [,1] [,2] [,3] [,4]
> [1,] "A" "A" "B" "B"
> [2,] "B" "B" "B" "B"
> [3,] "C" "C" "C" "C"
>
> When I build
Hi guys,
I hope you can help me with this.
Here is the problem:
I have some data (myData) that looks similar to this:
[,1] [,2] [,3] [,4]
[1,] "A" "A" "B" "B"
[2,] "B" "B" "B" "B"
[3,] "C" "C" "C" "C"
When I build a contingency table for the first and second row using:
tb <- tab
9 matches
Mail list logo