Thank you
From: Rui Barradas
To: Sarah Auburn
Cc: r-help@r-project.org
Sent: Monday, 2 July 2012, 17:39
Subject: Re: [R] table function in a matrix
Hello,
See the difference.
a <- b <- c("A", "A", "B", "B", "C", "A", &quo
. Sorry one more query for one of my datasets which has NAs
(missing genotypes). Is there any way in which I can count NAs?
Many thanks!
Sarah
From: Sarah Auburn
To: Petr Savicky
Cc: "r-help@r-project.org"
Sent: Thursday, 7 June 2012, 23:24
Subject: Re: [R] table function in a mat
ct: Re: [R] table function in a matrix
Perfect, thank you!
From: Petr Savicky
To: r-help@r-project.org
Sent: Thursday, 7 June 2012, 19:42
Subject: Re: [R] table function in a matrix
On Wed, Jun 06, 2012 at 11:02:46PM -0700, Sarah Auburn wrote:
> Hi,
> I am trying to get a summary of the cou
Perfect, thank you!
From: Petr Savicky
To: r-help@r-project.org
Sent: Thursday, 7 June 2012, 19:42
Subject: Re: [R] table function in a matrix
On Wed, Jun 06, 2012 at 11:02:46PM -0700, Sarah Auburn wrote:
> Hi,
> I am trying to get a summary of the cou
On Wed, Jun 06, 2012 at 11:02:46PM -0700, Sarah Auburn wrote:
> Hi,
> I am trying to get a summary of the counts of different variables for each
> sample in a matrix of the form "m" below to generate an output as shown.
> (Ultimately I want to generate a stacked barchart for each sample). I am on
Your question is a little vague. Do you just want to know how often z falls
in one the three classes? If so, you could either code an indicator variable
(e.g. z.cat) that expresses the three categories and then do table(z.cat).
Alternatively, you could just do
sum(z>0&z<1000)
sum(z>1&z<3000)
s
Inchallah Yarab wrote:
>
> i want to do a table summerizing the number of variable where z is in
> [0-1000],],[1000-3000], [> 3000]
>
You can use "cut" to create a new vector of labels and tabulate the result.
Options control closed/open endpoints (see ?cut):
> z <- c(100,1500,1200,500,3500,
On Aug 24, 2009, at 10:59 AM, Inchallah Yarab wrote:
hi,
i want to use the function table to build a table not of frequence
(number of time the vareable is repeated in a list or a data
frame!!) but in function of classes
I don t find a clear explnation in examples of ?table !!!
example
You need to create a factor that indicates which group the values in 'z' belong
to. The easiest way to do that based on your situation is to use the 'cut'
function to construct the factor, and then call 'table' using the result
created by 'cut'. See ?cut and ?factor
-Original Message
9 matches
Mail list logo