Re: [R] how to factor in the ID of the imported subtable to R table?

2020-05-21 Thread David Winsemius
On 5/21/20 9:24 AM, YANJUN CHEN via R-help wrote: Dear R community, I am new to R—did some online tutorials and exercises in R playground. I was wondering if I could seek guidance on the following matter. I have a set of 403 .csv files. Each.csv file contains the same layouts and distinguis

[R] how to factor in the ID of the imported subtable to R table?

2020-05-21 Thread YANJUN CHEN via R-help
Dear R community, I am new to R—did some online tutorials and exercises in R playground. I was wondering if I could seek guidance on the following matter. I have a set of 403 .csv files. Each.csv file contains the same layouts and distinguished by subject ID and date in the file name. The datas

Re: [R] table and unique seems to behave differently

2019-12-10 Thread William Dunlap via R-help
__ > De : Chris Evans > Envoyé : mardi 10 décembre 2019 15:41 > À : Alain Guillet > Cc : r-help@r-project.org > Objet : Re: [R] table and unique seems to behave differently > > This doesn't answer your question but I get exactly the same vector o

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
Thanks a lot, it answers my question. Alain De : Jeff Newmiller Envoy� : mardi 10 d�cembre 2019 16:31 � : r-help@r-project.org ; Duncan Murdoch ; Alain Guillet ; r-help@r-project.org Objet : Re: [R] table and unique seems to behave differently I think the

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Duncan Murdoch
On 10/12/2019 10:32 a.m., Sarah Goslee wrote: Back to the table part of the question, but using Duncan's example. x <- c(3.4, 3.4 + 1e-15) unique(x) [1] 3.4 3.4 table(x) x 3.4 2 The question was, why are these different. table() only works on factors, so it converts the numeric vector t

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
c : r-help@r-project.org Objet : Re: [R] table and unique seems to behave differently This doesn't answer your question but I get exactly the same vector of length 210 with unique(toto) and names(table(toto)) using the same version of R that you are and I can't see any obvious reason w

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Sarah Goslee
Back to the table part of the question, but using Duncan's example. > x <- c(3.4, 3.4 + 1e-15) > unique(x) [1] 3.4 3.4 > table(x) x 3.4 2 The question was, why are these different. table() only works on factors, so it converts the numeric vector to a factor before tabulation. factor() tries to

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Jeff Newmiller
I think the question was about table vs unique. Table groups by character representation, unique groups by the underlying representation. On December 10, 2019 7:03:34 AM PST, Duncan Murdoch wrote: >On 10/12/2019 3:53 a.m., Alain Guillet wrote: >> Hi, >> >> I have a vector (see below the dput)

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Duncan Murdoch
On 10/12/2019 3:53 a.m., Alain Guillet wrote: Hi, I have a vector (see below the dput) and I use unique on it to get unique values. If I then sort the result of the vector obtained by unique, I see some elements that look like identical. I suspect it could be a matter of rounded values but tab

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Chris Evans
To: r-help@r-project.org > Sent: Tuesday, 10 December, 2019 09:53:29 > Subject: [R] table and unique seems to behave differently > Hi, > > I have a vector (see below the dput) and I use unique on it to get unique > values. If I then sort the result of the vector obtained b

[R] table and unique seems to behave differently

2019-12-10 Thread Alain Guillet
Hi, I have a vector (see below the dput) and I use unique on it to get unique values. If I then sort the result of the vector obtained by unique, I see some elements that look like identical. I suspect it could be a matter of rounded values but table gives a different result: unlike unique outp

Re: [R] table , exclude - count the frequency in a data frame but exclude one value

2016-04-26 Thread William Dunlap via R-help
table converts its non-factor arguments to factors using the exclude argument that you supply. If you want the arguments to be handled differently, then convert them to factors yourself, in the way you want. E.g., > with(df, table(x=factor(x, exclude=1), y)) y x 1 2 3 2 0 1 0 3 1 0 0 >

[R] table , exclude - count the frequency in a data frame but exclude one value

2016-04-26 Thread jpm miao
Hi, I have a data frame with two variables x, y, both of which take values in the set {1,2,3}. I'd like to count the frequency by the command "table", but exclude the value "1" in variable x, but keep "1" in variable y. Is it possible? When I use "exclude", value 1 in both x and y are excluded

Re: [R] Table

2016-02-11 Thread David Winsemius
> On Feb 10, 2016, at 7:10 PM, Val wrote: > > Hi all, > > I want create a frequency table using this : > > xc1<- sample(c(1:10), 100, replace = TRUE) > xc2<- sample(c(0,1), 100, replace = TRUE) > > xc3<- cbind(xc1,xc2) > > tab1<- xc3[,list( d1=sum(xc2==0), d2=sum(xc2==1)),by=xc1] > > but no

Re: [R] Table

2016-02-10 Thread Ulrik Stervbo
Hi Val, Does this help: library(plyr) ddply(as.data.frame(xc3), .variables = "xc1", summarise, d1 = sum(xc2 == 0), d2 = sum(xc2 == 1)) You could also try aggregate(xc3, by = list(xc1, xc2), FUN = sum) and modify the output. Best, Ulrik On Thu, 11 Feb 2016 at 04:12 Val wrote: > Hi all, > >

[R] Table

2016-02-10 Thread Val
Hi all, I want create a frequency table using this : xc1<- sample(c(1:10), 100, replace = TRUE) xc2<- sample(c(0,1), 100, replace = TRUE) xc3<- cbind(xc1,xc2) tab1<- xc3[,list( d1=sum(xc2==0), d2=sum(xc2==1)),by=xc1] but not working. Error in `[.data.frame`(xc3, , list(d1 = sum(xc2 == 1), d2

Re: [R] Table Looks Funny

2015-07-24 Thread John Kane
gston ON Canada > -Original Message- > From: marissa.fahlb...@gmail.com > Sent: Thu, 23 Jul 2015 16:08:10 -0500 > To: r-help@r-project.org > Subject: [R] Table Looks Funny > > Hey, I can't seem to import my csv file in such a way that the table > looks > &

Re: [R] Table Looks Funny

2015-07-24 Thread Jim Lemon
Hi Marissa, Unfortunately we didn't "get the picture". If you want to send an image, PDF is probably your best bet. If that is not possible, perhaps a description of the weirdness that has confronted you will allow someone to suggest a solution. Jim On Fri, Jul 24, 2015 at 7:08 AM, Marissa Fahlbe

[R] Table Looks Funny

2015-07-23 Thread Marissa Fahlberg
Hey, I can't seem to import my csv file in such a way that the table looks "normal". The dimensions are correct, 4x7, and I set my header =TRUE, but it still looks weird. Attached is the picture. Any ideas?? Thanks!! -Marissa __ R-help@r-project.org mai

Re: [R] table

2015-03-03 Thread Jim Lemon
Hi Jeff, I don't have that package, but reading the documentation, I think you are right. Plus the tabular function already has the formatting worked out. Jim On Tue, Mar 3, 2015 at 7:26 PM, Jeff Newmiller wrote: > I suspect that the tabular function in the tables package would handle > this t

Re: [R] table

2015-03-03 Thread Jeff Newmiller
I suspect that the tabular function in the tables package would handle this task. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] table

2015-03-03 Thread Jim Lemon
Hi maicel, This may be completely off the mark, but the brkdnNest function in the plotrix package can produce a nested list of counts which can be transformed into percents (100*count/total). require(plotrix) data$dummy<-1 brkdnNest(dummy~Provincial+Municipios+unit,data,FUN="sum") The counts in y

[R] table

2015-03-02 Thread maicel
Hello List, I am trying to obtain a table containing absolute and relative frequencies but it must be done by strata. Each strata have to contain totals and subtotals being the sum of the subtotals equal to the total in upper strata in same column. As this could be some vague I am includi

Re: [R] table over a matrix dimension...

2014-07-10 Thread William Dunlap
You can make make a factor with a common set of levels out of each slice of the matrix so all the tables are the same size: f <- function (charMatrix, levels = unique(sort(as.vector(charMatrix { apply(charMatrix, 1, function(x) table(factor(x, levels = levels))) } used as > m <- cbind(c("A

Re: [R] table over a matrix dimension...

2014-07-10 Thread Marc Schwartz
On Jul 10, 2014, at 12:03 PM, Jonathan Greenberg wrote: > R-helpers: > > I'm trying to determine the frequency of characters for a matrix > applied to a single dimension, and generate a matrix as an output. > I've come up with a solution, but it appears inelegant -- I was > wondering if there i

[R] table over a matrix dimension...

2014-07-10 Thread Jonathan Greenberg
R-helpers: I'm trying to determine the frequency of characters for a matrix applied to a single dimension, and generate a matrix as an output. I've come up with a solution, but it appears inelegant -- I was wondering if there is an easier way to accomplish this task: # Create a matrix of "factors

Re: [R] table of contents link style in R's PDF docs

2013-09-27 Thread Duncan Murdoch
On 26/09/2013 10:33 AM, Duncan Murdoch wrote: On 25/09/2013 11:38 PM, Ben Harrison wrote: > Hello, > I am mildly annoyed each time I use a PDF doc of an R package that the > table of contents hyperlinks are *only* on the page numbers. To activate > a hyperlink, one must carefully scan sideways fr

Re: [R] table of contents link style in R's PDF docs

2013-09-26 Thread Ben Harrison
On 27/09/13 00:33, Duncan Murdoch wrote: On 25/09/2013 11:38 PM, Ben Harrison wrote: Hello, It's been the way it is for about 14 years, and I don't recall anyone else complaining, so I'd conclude it must have been set that way with you in mind. Ah-hah, I knew it! I *am* special. More ser

Re: [R] table of contents link style in R's PDF docs

2013-09-26 Thread Ben Harrison
On 27/09/13 00:03, Ista Zahn wrote: Hi Ben, On Wed, Sep 25, 2013 at 11:38 PM, Ben Harrison wrote: Hello, I agree that it would be nicer to have the whole TOC entry hyperlinked. But out of curiosity, why are you using the pdf documentation? I find the html much nicer. Best, Ista It's ju

Re: [R] table of contents link style in R's PDF docs

2013-09-26 Thread Duncan Murdoch
On 25/09/2013 11:38 PM, Ben Harrison wrote: Hello, I am mildly annoyed each time I use a PDF doc of an R package that the table of contents hyperlinks are *only* on the page numbers. To activate a hyperlink, one must carefully scan sideways from the text item wanted to the far right of the page a

Re: [R] table of contents link style in R's PDF docs

2013-09-26 Thread Ista Zahn
Hi Ben, On Wed, Sep 25, 2013 at 11:38 PM, Ben Harrison wrote: > Hello, > I am mildly annoyed each time I use a PDF doc of an R package that the table > of contents hyperlinks are *only* on the page numbers. To activate a > hyperlink, one must carefully scan sideways from the text item wanted to

[R] table of contents link style in R's PDF docs

2013-09-25 Thread Ben Harrison
Hello, I am mildly annoyed each time I use a PDF doc of an R package that the table of contents hyperlinks are *only* on the page numbers. To activate a hyperlink, one must carefully scan sideways from the text item wanted to the far right of the page and click on a tiny box. Multiply that mild

Re: [R] table() generating NAs when there are no NAs in the underlying data

2013-05-20 Thread Duncan Murdoch
On 13-05-20 4:34 AM, James Savage wrote: Hi all, Just a quick question: I want to generate a column of counts of a particular variable. The easiest way seems to be using table(). For reasonably small amounts of data, there seems to be no problem. C <- data.frame(A1 = sample(1:1000, 10, repl

[R] table() generating NAs when there are no NAs in the underlying data

2013-05-20 Thread James Savage
Hi all, Just a quick question: I want to generate a column of counts of a particular variable. The easiest way seems to be using table(). For reasonably small amounts of data, there seems to be no problem. C <- data.frame(A1 = sample(1:1000, 10, replace = TRUE), B1 = sample(1:1000, 10, r

Re: [R] Table with n(%) formatting: A better way to do this?

2013-04-11 Thread Duncan Murdoch
On 11/04/2013 8:40 AM, Paul Miller wrote: Hello Dr. Murdoch, Thanks for your reply. Your tables package is interesting. Spent some time experimenting with it yesterday and it looks like something I can use. The n(%) format seems to be the standard for what I'm doing. So I can't directly use t

Re: [R] Table with n(%) formatting: A better way to do this?

2013-04-11 Thread Paul Miller
Hello Dr. Murdoch, Thanks for your reply. Your tables package is interesting. Spent some time experimenting with it yesterday and it looks like something I can use. The n(%) format seems to be the standard for what I'm doing. So I can't directly use the output your package produces. It does pro

Re: [R] Table with n(%) formatting: A better way to do this?

2013-04-10 Thread Duncan Murdoch
On 10/04/2013 11:59 AM, Paul Miller wrote: Hello All, Am learning to create tables with n(%) formatting using R. Below is a working example. I think this is not bad but wondered if there are better ways of doing it. Although it can be quite humbling, seeing good code helps me assess my progre

[R] Table with n(%) formatting: A better way to do this?

2013-04-10 Thread Paul Miller
Hello All, Am learning to create tables with n(%) formatting using R. Below is a working example. I think this is not bad but wondered if there are better ways of doing it. Although it can be quite humbling, seeing good code helps me assess my progress as an R programmer. Ultimately want to h

Re: [R] table of list objects

2013-01-03 Thread soon yi
perfect. thanks for the quick reply soon yi wrote > Hi > > I have a list such as this > > list(c("q","w"),"r",c("r","w"),c("q","w")) > > How do i create a table to include the count of groups of terms please? > > ie so output is like / similar to > > q","w""r" "r","w" > 2

Re: [R] table of list objects

2013-01-03 Thread jim holtman
try this: > x <- + list(c("q","w"),"r",c("r","w"),c("q","w")) > x [[1]] [1] "q" "w" [[2]] [1] "r" [[3]] [1] "r" "w" [[4]] [1] "q" "w" > # create vectors of what is in the list > x.v <- sapply(x, paste, collapse = ', ') > table(x.v) x.v q, wr r, w 211 > On Thu, Jan 3, 2013 at

[R] table of list objects

2013-01-03 Thread soon yi
Hi I have a list such as this list(c("q","w"),"r",c("r","w"),c("q","w")) How do i create a table to include the count of groups of terms please? ie so output is like / similar to q","w""r" "r","w" 211 thanks for any help -- View this message in contex

Re: [R] R table as integrable object for large Latex Documents - avoiding SWeave

2012-08-14 Thread Rainer M Krug
ces. Some editors actually offer the option to import a csv file and convert it to LaTeX, gnumeric (and possibly LibreOffice) can export to LaTeX, but I would possibly use option 2) or 1) Cheers, Rainer > > Thanks Christian > > > > - Christian Langkamp christian.langka

Re: [R] R table as integrable object for large Latex Documents - avoiding SWeave

2012-08-13 Thread Duncan Mackay
rate into > LaTeX, keep their format etc. > > Thanks > Christian > > > > - > Christian Langkamp > christian.langkamp-at-gmxpro.de > > -- > View this message in context: http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Document

Re: [R] R table as integrable object for large Latex Documents - avoiding SWeave

2012-08-13 Thread Ista Zahn
stian > > > > - > Christian Langkamp > christian.langkamp-at-gmxpro.de > > -- > View this message in context: > http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Documents-avoiding-SWeave-tp4640183.html > Sent from the R help mailing list

[R] R table as integrable object for large Latex Documents - avoiding SWeave

2012-08-13 Thread clangkamp
CSV style objects that *easily* integrate into LaTeX, keep their format etc. Thanks Christian - Christian Langkamp christian.langkamp-at-gmxpro.de -- View this message in context: http://r.789695.n4.nabble.com/R-table-as-integrable-object-for-large-Latex-Documents-avoiding-SWeave-tp4640183

Re: [R] Table/Frame - output

2012-07-17 Thread andrija djurovic
Hi. You should check function addtable2plot from plotrix package. Also, here is an example of modified addtable2plot function that I sometimes use. This function is probably to far from perfect but, maybe, it will give you some ideas how to solve your problem: t2p <- function(x=par("usr")[1],y=

Re: [R] Table/Frame - output

2012-07-17 Thread Greg Snow
There are functions that allow for the "plotting" of text and R objects that could be used to plot to a bitmap. Look at the 'addtable2plot' function in the plotrix package and the textplot function in the gplots package (look for alternative spellings if you don't find them based on those exact sp

[R] Table/Frame - output

2012-07-17 Thread jcrosbie
I would like to output a nicely formatted data frame to a bitmap. Is this possible in R? -- View this message in context: http://r.789695.n4.nabble.com/Table-Frame-output-tp4636790.html Sent from the R help mailing list archive at Nabble.com. __ R-

Re: [R] table function in a matrix

2012-07-02 Thread Sarah Auburn
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

Re: [R] table function in a matrix

2012-07-02 Thread Rui Barradas
. 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

Re: [R] table function in a matrix

2012-07-02 Thread Sarah Auburn
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

Re: [R] table function in a matrix

2012-06-07 Thread Sarah Auburn
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

Re: [R] table function in a matrix

2012-06-07 Thread Petr Savicky
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

[R] table function in a matrix

2012-06-07 Thread Sarah Auburn
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 only able to get the "table" function to work on one sample (column) at

Re: [R] table: output: all variables in rows

2012-04-05 Thread Marion Wenty
Hello David, yes! this is what I was looking for! Thank you very much for your help. Marion 2012/4/2 David Winsemius > > On Apr 2, 2012, at 7:11 AM, Marion Wenty wrote: > > Dear people, >> >> I would like to create a table out of a data.frame. >> >> How can I determine, which variables are p

Re: [R] table: output: all variables in rows

2012-04-02 Thread David Winsemius
On Apr 2, 2012, at 7:11 AM, Marion Wenty wrote: Dear people, I would like to create a table out of a data.frame. How can I determine, which variables are put in the rows and which in the columns? I would like to get all the variables in the ROWS: I am including a simple example: D<-data.

[R] table: output: all variables in rows

2012-04-02 Thread Marion Wenty
Dear people, I would like to create a table out of a data.frame. How can I determine, which variables are put in the rows and which in the columns? I would like to get all the variables in the ROWS: I am including a simple example: D<-data.frame(age=c(8,9,10),county=c("B","W","W")) the output

Re: [R] Table into a list

2012-03-06 Thread Thomas Coquet
Hello, Thanks to all for your answers. The solution given by R. Michael was perfect ! Thank you very much, that helped a lot ! Thomas On Tue, Feb 28, 2012 at 11:50 AM, Alemtsehai Abate wrote: > Perhaps, the following does it as well. > > (d <- data.frame(x1=letters[2*1:4 - 1], x2=letters[2*1:4]))

Re: [R] Table into a list

2012-02-28 Thread Alemtsehai Abate
Perhaps, the following does it as well. (d <- data.frame(x1=letters[2*1:4 - 1], x2=letters[2*1:4])) c(t(d)) Alemtsehai >> Hello, >> I am looking for a way to transform an array into a list (or a string). >> My array has two columns 1 and 2, and I would like to create a list of the >> values

Re: [R] Table into a list

2012-02-24 Thread Jorge I Velez
My apologies. The last line should have been with(d, sort(c(as.character(x1), as.character(x2 Regards, Jorge.- On Sat, Feb 25, 2012 at 2:03 AM, Jorge I Velez <> wrote: > Perhaps the following? > > d <- structure(list(x1 = structure(1:4, .Label = c("a", "c", "e", > "g"), class = "factor"),

Re: [R] Table into a list

2012-02-24 Thread R. Michael Weylandt
My apologies: I missed the order of the desired output: the easiest thing to do is likely to use the same techniques given below (and by others in this thread) with a transpose t() before. Michael On Sat, Feb 25, 2012 at 2:05 AM, R. Michael Weylandt wrote: > Your question is not well formed: do

Re: [R] Table into a list

2012-02-24 Thread R. Michael Weylandt
Your question is not well formed: do you want a list or a string (totally different things)? Or even more likely, a character vector? What do you have now: is it really an array (=matrix) or is it the data.frame it looks like? If it's a matrix: x <- matrix(letters[1:8], ncol = 2) x <- as.vector(x

Re: [R] Table into a list

2012-02-24 Thread Jorge I Velez
Perhaps the following? d <- structure(list(x1 = structure(1:4, .Label = c("a", "c", "e", "g"), class = "factor"), x2 = structure(1:4, .Label = c("b", "d", "f", "h"), class = "factor")), .Names = c("x1", "x2"), class = "data.frame", row.names = c("1", "2", "3", "4")) with(d, c(as.character(x1), as

Re: [R] Table into a list

2012-02-24 Thread Rui Barradas
Hello, Try (d <- data.frame(x1=letters[2*1:4 - 1], x2=letters[2*1:4])) c(apply(d, 1, identity)) Note that you'll need the concatenation 'c()'. Hope this helps, Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/Table-into-a-list-tp4418804p4419091.html Sent from the

[R] Table into a list

2012-02-24 Thread thomas88
Hello, I am looking for a way to transform an array into a list (or a string). My array has two columns 1 and 2, and I would like to create a list of the values. Let's say I have : x1 x2 1 a b 2 c d 3 e f 4 g h What I would li

Re: [R] Table rearranging

2012-02-10 Thread David Winsemius
d blue 8 8 0.8945757 1230 open blue (You could have used Dunlap's resutl and tested for both the meanOpen and meanClosed values being not-is.na.) -- David Jeffrey CC: r-help@r-project.org From: dwinsem...@comcast.net To: johjeff...@hotmail.

Re: [R] Table rearranging

2012-02-10 Thread Jeffrey Joh
Hi David, Totally forgot line 3!  So "513 red" should be ok but "420 red" and "917 yellow" aren't. Jeffrey > CC: r-help@r-project.org > From: dwinsem...@comcast.net > To: johjeff...@hotmail.com > Subjec

Re: [R] Table rearranging

2012-02-07 Thread David Winsemius
co.com From: dwinsem...@comcast.net To: johjeff...@hotmail.com Subject: Re: [R] Table rearranging Date: Tue, 7 Feb 2012 09:08:00 -0500 On Feb 7, 2012, at 4:21 AM, Jeffrey Joh wrote: Thank you for your help, Bill. From the original table (not the plyr output), I would like to remove all the line

Re: [R] Table rearranging

2012-02-07 Thread Jeffrey Joh
red" condition has an open measurement, but no closed measurement.  Therefore, line 1 should be deleted. Jeffrey > CC: r-help@r-project.org; wdun...@tibco.com > From: dwinsem...@comcast.net > To: johjeff...@hotmail.com > Subject: Re: [R]

Re: [R] Table rearranging

2012-02-07 Thread David Winsemius
ize, meanClosed=mean(measurement[door=="closed"]), nClosed=sum(door=="closed")) -- David Jeffrey From: wdun...@tibco.com To: johjeff...@hotmail.com; r-help@r-project.org Subject: RE: [R] Table rearranging Date: Tue, 7 Feb 2012 00:43:

Re: [R] Table rearranging

2012-02-07 Thread Jeffrey Joh
nt, then the Closed yellow should be deleted. How can I make this change? Jeffrey > From: wdun...@tibco.com > To: johjeff...@hotmail.com; r-help@r-project.org > Subject: RE: [R] Table rearranging > Date: Tue, 7 Feb 2012 00:43:25 + &

Re: [R] Table rearranging

2012-02-06 Thread William Dunlap
0 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Jeffrey Joh > Sent: Monday, February 06, 2012 4:28 PM > To: r-help@r-project.org > Sub

[R] Table rearranging

2012-02-06 Thread Jeffrey Joh
I have a table that looks like this: measurement    date    door    color 0.93529385    513    open    red 0.97419293    420    open    red 0.962053514    513    closed    red 0.963909937    1230    open    blue 0.97652034    1230    open    green 0.989310795    1230    closed    blue 0.9941022  

Re: [R] Table Intersection

2012-01-19 Thread rantree
thank you a lot :) -- View this message in context: http://r.789695.n4.nabble.com/Table-Intersection-tp4306968p4309929.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] R Table

2012-01-18 Thread Ajay Askoolum
Thank you. I used capture.output(); this is fine. From: R. Michael Weylandt Cc: R General Forum Sent: Wednesday, 18 January 2012, 19:44 Subject: Re: [R] R Table Capture in what file format / device? If you want a plain text log, sink() or capture.output

Re: [R] R Table

2012-01-18 Thread R. Michael Weylandt
My mistake: MASS::write.matrix() or utils::write.table() Michael On Wed, Jan 18, 2012 at 2:44 PM, R. Michael Weylandt wrote: > Capture in what file format / device? > > If you want a plain text log, sink() or capture.output() probably will > do it. MASS::write.table() might also help. > > I beli

Re: [R] R Table

2012-01-18 Thread R. Michael Weylandt
Capture in what file format / device? If you want a plain text log, sink() or capture.output() probably will do it. MASS::write.table() might also help. I believe library(Hmisc) has some functions for converting to LaTeX tables as well, but I haven't used those myself. Michael On Wed, Jan 18, 2

[R] R Table

2012-01-18 Thread Ajay Askoolum
Given a table with colnames and rownames, print(mytable) displays the table nicely formatted. How can I capture all of what is displayed as a character matrix? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list ht

Re: [R] Table Intersection

2012-01-18 Thread Martin Morgan
On 01/18/2012 07:25 AM, rantree wrote: I've got two tables first one(table1): ID chromstart end Ex1 2152 180 Ex2 10 2000 2220 Ex3 15 3000 4000 second one ( table2): chrom loca

[R] Table Intersection

2012-01-18 Thread rantree
I've got two tables first one(table1): ID chromstart end Ex1 2152 180 Ex2 10 2000 2220 Ex3 15 3000 4000 second one ( table2): chrom locationname 2 16

Re: [R] table of Design regressions?

2011-05-26 Thread Marc Schwartz
On May 26, 2011, at 10:01 AM, David Hugh-Jones wrote: > Hi all > > Just a quick question which I can't find an answer for in the usual places: > I would like to create a table of regression output, with one or more > regressions in the columns, a la xtable. But I am using models from the > Design

[R] table of Design regressions?

2011-05-26 Thread David Hugh-Jones
Hi all Just a quick question which I can't find an answer for in the usual places: I would like to create a table of regression output, with one or more regressions in the columns, a la xtable. But I am using models from the Design package. Is there anything out there that will play nicely with th

Re: [R] table() reading problem

2011-03-17 Thread Jim Lemon
Sender: r-help-boun...@r-project.org On-Behalf-Of: j...@bitwrit.com.au Subject: Re: [R] table() reading problem Message-Id: <4d81c14a.2000...@bitwrit.com.au> Recipient: killian.door...@barclayscapital.com ___ e at 1 Churchill Place, London, E

Re: [R] table() reading problem

2011-03-17 Thread Jim Lemon
On 03/16/2011 08:20 PM, fre wrote: I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem to work

Re: [R] table() reading problem

2011-03-16 Thread Allan Engelhardt
On 16/03/11 09:20, fre wrote: I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem The first

Re: [R] table() result issue

2011-03-16 Thread Dennis Murphy
> k<-c(1,1,1,1,1,3,5,6,2,1,3,9,2,3,1,1,1) > table(k) k 1 2 3 5 6 9 9 2 3 1 1 1 > names(table(k)) [1] "1" "2" "3" "5" "6" "9" > as.numeric(names(table(k))) [1] 1 2 3 5 6 9 > x <- table(k) > as.numeric(names(table(k)))[4] [1] 5 You can always save the (numeric version of the) names as an object, too

Re: [R] table() reading problem

2011-03-16 Thread Sarah Goslee
It isn't entirely clear to me what you want. table() can function with many kinds of data, not just integers, so it returns a vector with names. For your case, with integer classes, you seem to possibly want: > x <- table(k) > x <- rbind(as.numeric(names(x)), as.numeric(x)) > x [,1] [,2] [,3

[R] table() result issue

2011-03-16 Thread Frédérique Kuiper
Dear reader, I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem to work either. The levels

[R] table() reading problem

2011-03-16 Thread fre
I have the following problem: I have some string with numbers like k. I want to have a table like the function table() gives. However I am not able to call the first row, the 1, 2, 3, 5, 6 or 9. I tried to do that by a data.frame, but that doesn't seem to work either. The levels keep bothering me.

Re: [R] Table multiple answers variables

2011-03-15 Thread Orvalho Augusto
This is! Thank you everyone. Caveman On Tue, Mar 15, 2011 at 4:24 PM, Dimitris Rizopoulos < d.rizopou...@erasmusmc.nl> wrote: > try the following: > > DF <- as.data.frame(matrix(sample(2, 120, TRUE), 10, 12)) > > Results <- data.frame( >var = names(DF), >count = colSums(DF == 1), >

Re: [R] Table multiple answers variables

2011-03-15 Thread Dimitris Rizopoulos
try the following: DF <- as.data.frame(matrix(sample(2, 120, TRUE), 10, 12)) Results <- data.frame( var = names(DF), count = colSums(DF == 1), percentage = colMeans(DF == 1) ) I hope it helps. Best, Dimitris On 3/15/2011 3:13 PM, Orvalho Augusto wrote: I have a dataset like thi

Re: [R] Table multiple answers variables

2011-03-15 Thread Henrique Dallazuanna
Try this: data.frame(count = colSums(x == 1), percentage = colSums(x == 1) / nrow(x)) On Tue, Mar 15, 2011 at 11:13 AM, Orvalho Augusto wrote: > I have a dataset like this: > > q25_1 q25_2 q25_3 q25_4 q25_5 q25_6 q25_7 q25_8 q25_9 q25_10 q25_11 > q25_12 > 1 2 2 1 1 2

[R] Table multiple answers variables

2011-03-15 Thread Orvalho Augusto
I have a dataset like this: q25_1 q25_2 q25_3 q25_4 q25_5 q25_6 q25_7 q25_8 q25_9 q25_10 q25_11 q25_12 1 2 2 1 1 2 1 2 1 1 2 1 3 2 2 2 2 1 2 1 2 1 1 2 1 2 3 2 1 1 1 2

[R] table on factors with non-ASCII characters *extremely* slow on Windows

2011-01-19 Thread Karl Ove Hufthammer
Running ‘table’ on a factor with levels containing non-ASCII characters seems to result in *extremely* bad performance on Windows. Here’s a simple example with benchmark results (I’ve reduced the number of replications to make the function finish within reasonable time): library(rbenchmark) x.

Re: [R] table with values as dots in increasing sizes

2010-11-06 Thread Michael Friendly
This is a "tableplot", available on R-Forge at https://r-forge.r-project.org/projects/tableplot/ install.packages("tableplot", repos="http://R-Forge.R-project.org";) will install, as long as you are using R 2.12.x; otherwise, you'll have to download the source package and install from source. -

Re: [R] table with values as dots in increasing sizes

2010-11-05 Thread Gabor Grothendieck
On Fri, Nov 5, 2010 at 4:45 AM, fugelpitch wrote: > > I was just thinking of a way to present data and if it is possible in R. > > I have a data frame that looks as follows (this is just mockup data). > > df > location,"species1","species2","species3","species4","species5" > "loc1",0.44,0.28,0.37,

Re: [R] table with values as dots in increasing sizes

2010-11-05 Thread ONKELINX, Thierry
hn Tukey > -Oorspronkelijk bericht- > Van: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] Namens fugelpitch > Verzonden: vrijdag 5 november 2010 9:45 > Aan: r-help@r-project.org > Onderwerp: [R] table with values as dots in increasing sizes >

[R] table with values as dots in increasing sizes

2010-11-05 Thread fugelpitch
I was just thinking of a way to present data and if it is possible in R. I have a data frame that looks as follows (this is just mockup data). df location,"species1","species2","species3","species4","species5" "loc1",0.44,0.28,0.37,-0.24,0.41 "loc2",0.54,0.62,0.34,0.52,0.71 "loc3",-0.33,0.75,-0.

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Kjetil Halvorsen
for the loop part: put all your xml files in a directory with no other files, do setwd("directory/with/xml/files") files <- list.files() for (file in files) kjetil 2010/10/27 Ista Zahn : > Hi Jørgen, > You will be better served by learning how to find the answers to these > kinds of questions

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Ista Zahn
Hi Jørgen, You will be better served by learning how to find the answers to these kinds of questions on your own. You can either use a general search engine such as google: http://lmgtfy.com/?q=read+multiple+files+in+R http://lmgtfy.com/?q=read+xml+data+in+R or using an R specific search engine. At

  1   2   3   >