Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-18 Thread David L Carlson
-- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of jagadishpchary Sent: Thursday, June 18, 2015 1:46 AM To: r-help@r-project.org Subje

Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-18 Thread jagadishpchary
I think my explanation in the post is not giving the full details on the job to be done. Sorry for that. Here is what I am doing.. 1. I have a SPSS data set with more than 2000 variables. However for test purpose I have created a temporary data set with 5 variables which I am reading it to R

Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-09 Thread John Kane
gt; Subject: [R] Cross tabulation with top one variable and side as multiple > variables > > Hi: > > I have a huge data with lot of variables and I need to check the trend > variations from year to year. In order to do so, I have to cross tabulate > the year variable as

Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-09 Thread Jeff Newmiller
There are two issues here... calculation and presentation. The table function from base R can work with many variables. If your data set is so large that you have problems with memory then you could investigate data.table or sqldf packages, which perform the computations but do not present the d

Re: [R] Cross tabulation with top one variable and side as multiple variables

2015-06-09 Thread David Winsemius
On Jun 9, 2015, at 1:40 AM, jagadishpchary wrote: > Hi: > > I have a huge data with lot of variables and I need to check the trend > variations from year to year. In order to do so, I have to cross tabulate > the year variable as top (constant) and all the remaining variables as side > (attached

[R] Cross tabulation with top one variable and side as multiple variables

2015-06-09 Thread jagadishpchary
Hi: I have a huge data with lot of variables and I need to check the trend variations from year to year. In order to do so, I have to cross tabulate the year variable as top (constant) and all the remaining variables as side (attached the cross tabulation report). I have searched the forums but th

Re: [R] Cross Tabulation

2013-11-11 Thread David Carlson
d From: Peter Maclean [mailto:pmaclean2...@yahoo.com] Sent: Sunday, November 10, 2013 12:52 PM To: dcarl...@tamu.edu Subject: Re: [R] Cross Tabulation Thanks. But I am creating lots of tables and I need Regions and Districts to appear so as to avoid to much editing.   Peter Maclean Department of

Re: [R] Cross Tabulation

2013-11-10 Thread David Carlson
elp-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Maclean Sent: Sunday, November 10, 2013 12:06 AM To: r-help@r-project.org Subject: Re: [R] Cross Tabulation #Would like to create a cross-table (Region, district, response) and #(Region, district, cost. The flat table

Re: [R] Cross Tabulation

2013-11-10 Thread Peter Maclean
#Would like to create a cross-table (Region, district, response) and #(Region, district, cost. The flat table function does not look so good region <- c("A","A","A","A","B","B", "B", "B", "C","C", "C", "C") district <- c("d","d","e","e","f","f", "g", "g", "h","h", "i", "j") response <- c("ye

Re: [R] Cross tabulation with fixed dimensions

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 11:43 AM, Tarmo Remmel wrote: Hello, This is a seemingly simple task, but it has been frustrating me for too long, so I am turning to this list for some help. I have two vectors of factors which are quite long; two simple examples are shown here: No, those are not "

Re: [R] Cross tabulation with fixed dimensions

2010-03-05 Thread Gabor Grothendieck
Those are numerical, not factors. If they were factors all levels would be represented. > a <- factor(c(1,2,3,4,5), levels = 1:5) > b <- factor(c(1,2,5,5,6), levels = 1:6) > table(a, b) b a 1 2 3 4 5 6 1 1 0 0 0 0 0 2 0 1 0 0 0 0 3 0 0 0 0 1 0 4 0 0 0 0 1 0 5 0 0 0 0 0 1 On Fri, M

[R] Cross tabulation with fixed dimensions

2010-03-05 Thread Tarmo Remmel
Hello, This is a seemingly simple task, but it has been frustrating me for too long, so I am turning to this list for some help. I have two vectors of factors which are quite long; two simple examples are shown here: > a <- c(1,2,3,4,5) > b <- c(1,2,5,5,6) If I produce a cross-tabulation of the

Re: [R] cross tabulation for frequency distributions

2009-08-14 Thread milton ruser
Like this? age<-as.integer(sample(rnorm(100, mean=30, sd=10), replace=T)) height<-as.integer(1+age*rnorm(100,mean=1,sd=0.2)) plot(age, height) table(age,height) or freq=data.frame(table(age,height)) freq<-subset(freq,Freq>0) freq bests milton On Fri, Aug 14, 2009 at 5:02 AM, rajclinasia wrote

[R] cross tabulation for frequency distributions

2009-08-14 Thread rajclinasia
Hi every one, how to get frequency distributions for one variable across other variable. ex: var1=age, var2=height i need frequency distribution of age across height. Thanks in Advance. -- View this message in context: http://www.nabble.com/cross-tabulation-for-frequency-distributions-tp2496853

Re: [R] cross tabulation: convert frequencies to percentages

2009-02-27 Thread Marc Schwartz
on 02/27/2009 08:43 AM soeren.vo...@eawag.ch wrote: > Hello, > > might be rather easy for R pros, but I've been searching to the dead end > to ... > > twsource.area <- table(twsource, area, useNA="ifany") > > gives me a nice cross tabulation of frequencies of two factors, but now > I want to con

[R] cross tabulation: convert frequencies to percentages

2009-02-27 Thread soeren . vogel
Hello, might be rather easy for R pros, but I've been searching to the dead end to ... twsource.area <- table(twsource, area, useNA="ifany") gives me a nice cross tabulation of frequencies of two factors, but now I want to convert to pecentages of those absolute values. In addition I'd l

Re: [R] Cross-tabulation Question

2008-09-29 Thread Gabor Grothendieck
Try this: > with(unique(x), table(V2, V3)) V3 V2Apple Cake One 21 On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > Hi R, > > > > This is a cross tabulation question. Suppose that, > > > >> d=read.table("clipboard",header=F) > > > >> d > >

Re: [R] Cross-tabulation Question

2008-09-29 Thread John Kane
?aggregate or have a look at the reshape package. --- On Mon, 9/29/08, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > From: Shubha Vishwanath Karanth <[EMAIL PROTECTED]> > Subject: [R] Cross-tabulation Question > To: [EMAIL PROTECTED] > Received: Monday, Septembe

Re: [R] Cross-tabulation Question

2008-09-29 Thread jim holtman
> x V1 V2V3 1 A One Apple 2 A One Cake 3 A One Cake 4 B One Apple 5 B One Apple 6 B One Apple > tapply(x$V1, list(x$V2, x$V3), function(z) length(unique(z))) Apple Cake One 21 > On Mon, Sep 29, 2008 at 4:54 AM, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> wrote: > Hi R

[R] Cross-tabulation Question

2008-09-29 Thread Shubha Vishwanath Karanth
Hi R, This is a cross tabulation question. Suppose that, > d=read.table("clipboard",header=F) > d V1 V2V3 A One Apple A One Cake A One Cake B One Apple B One Apple B One Apple > table(d$V2,d$V3) Apple Cake One 42 Bu

Re: [R] cross tabulation

2007-10-14 Thread James Reilly
On 14/10/07 5:39 PM, Louis Martin wrote: > I am looking for an efficient and fast way for doing this: > > for (v in 1:dw) {ok <-list1[v,] > > for (z in 1:5) {kk = ok[z] ; > for (o in 1:t) {if (kk== list[o]) n<- n+1}} > show(n) } > > list1 : a data.fra

[R] cross tabulation

2007-10-13 Thread Louis Martin
Howdy, I am looking for an efficient and fast way for doing this: for (v in 1:dw) {ok <-list1[v,] for (z in 1:5) {kk = ok[z] ; for (o in 1:t) {if (kk== list[o]) n<- n+1}} show(n) } list1 : a data.frame with nrow = dw ; ncol = z; list2 : a data.fram