Re: [R] Selecting data from list object

2011-04-06 Thread Joshua Wiley
Hi Santosh, Try this: sapply(d, `[[`, i = 1) To answer your question about "without using the apply functions", I think the answer is "not really". Data frames are a type of list, so if you can assume that it is reasonable to extract the same element from every element of your list, that is for

[R] Odp: Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.04.2011 22:02:29: > I have cobbled together the following logic. It works but is very > slow. I'm sure that there must be a better r-specific way to implement > this kind of thing, but have been unable to find/understand one. Any > help would

Re: [R] Selecting data from list object

2011-04-06 Thread Jorge Ivan Velez
Hi Santosh, One way would be > sapply(d, "[", 1) [1] "20110405" "20110405" "20110405" "20110405" "20110405" "20110405" HTH, Jorge On Thu, Apr 7, 2011 at 2:14 AM, santosh <> wrote: > Hello Group, > > Is there a simpler way to get data out of a list object? (like in data > frame without using t

[R] Selecting data from list object

2011-04-06 Thread santosh
Hello Group, Is there a simpler way to get data out of a list object? (like in data frame without using the apply functions) I have the following dataset > dput(d) list(c("20110405", "092102"), c("20110405", "092538"), c("20110405", "093458"), c("20110405", "101124"), c("20110405", "102041"),

Re: [R] Sweave Cairo driver?

2011-04-06 Thread Liviu Andronic
Dear Brian On Thu, Apr 7, 2011 at 6:39 AM, Prof Brian Ripley wrote: >> allows for easier font >> selection out of a greater range of available fonts, > As does cairo_pdf(), builtin to R and more reliable in my experience. > I've looked into the help pages and searched the lists, but could only fi

Re: [R] force output dimension of table function

2011-04-06 Thread Jorge Ivan Velez
Hi, You might try > table(factor(s, levels = 0:5)) 0 1 2 3 4 5 0 1 1 1 0 2 HTH, Jorge On Wed, Apr 6, 2011 at 11:37 PM, fisken <> wrote: > I have a small annoying problem. > > When I use the 'table' function on a simple vector it counts the > number of occurences. > So depending on the values

Re: [R] Sweave Cairo driver?

2011-04-06 Thread Liviu Andronic
On Thu, Apr 7, 2011 at 6:39 AM, Prof Brian Ripley wrote: > This is simple in 2.13.0 RC, which allows you to add graphics devices for > Sweave. > Interesting. Which help files should I look into? > On Wed, 6 Apr 2011, Liviu Andronic wrote: >> since the former supports Unicode, allows for easier f

[R] force output dimension of table function

2011-04-06 Thread fisken
I have a small annoying problem. When I use the 'table' function on a simple vector it counts the number of occurences. So depending on the values of my input vector the function returns a class of type table with different lengths. Is there an easy way to tell the table function, the values to e

[R] Ports for communicating with R-mirros sites?

2011-04-06 Thread Debraj GuhaThakurta
Hi, I have been having an error since past couple of days to connect to several of the mirror sites. I wonder if anyone knows the port/s for communicating with the R-mirror sites for downloading packages. If we know this we may be able to figure the problem at our end. Debraj

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Marius Hofert
Very nice! Cheers, Marius On 2011-04-07, at 04:38 , Dennis Murphy wrote: > Here are a couple more possibilities: > > plot(0, 0, main = expression(italic(X)[1]^bold(scriptscriptstyle("/" > plot(0, 0, main = expression(italic(X)[1]^bolditalic(scriptscriptstyle("/" > > The latter increas

Re: [R] Sweave Cairo driver?

2011-04-06 Thread Prof Brian Ripley
This is simple in 2.13.0 RC, which allows you to add graphics devices for Sweave. On Wed, 6 Apr 2011, Liviu Andronic wrote: Dear all I would like to use Sweave with the Cairo() graphics device instead of pdf(), since the former supports Unicode, allows for easier font selection out of a greate

Re: [R] problem with all/all.equal

2011-04-06 Thread Henrik Bengtsson
On Wed, Apr 6, 2011 at 9:23 PM, Joshua Wiley wrote: > Hi Laura, > > You have gotten several good suggestions.  Here are two more that may > be helpful if you have (or potentially could have) unruly data.  In > one case, the values are theoretically, but not computationally > identical.  In the oth

Re: [R] General binary search?

2011-04-06 Thread Stavros Macrakis
Martin, Thank you for your exploration of implementations of bsearch! In my application, length(val) is very small (typically 2), so vectorization over val doesn't help -- though vectorization over tab could work by doing n-ary instead of 2-ary splits with something like match(TRUE, val

Re: [R] problem with all/all.equal

2011-04-06 Thread Joshua Wiley
Hi Laura, You have gotten several good suggestions. Here are two more that may be helpful if you have (or potentially could have) unruly data. In one case, the values are theoretically, but not computationally identical. In the other, missing values lead to NA being returned, which may be a pro

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Dennis Murphy
Here are a couple more possibilities: plot(0, 0, main = expression(italic(X)[1]^bold(scriptscriptstyle("/" plot(0, 0, main = expression(italic(X)[1]^bolditalic(scriptscriptstyle("/" The latter increases the angle a tad. HTH, Dennis On Wed, Apr 6, 2011 at 3:49 PM, Peter Ehlers wrote: >

Re: [R] Getting number of students with zeroes in long format

2011-04-06 Thread Dennis Murphy
Hi: Another approach would be to use xtabs(). Letting df represent your example data frame, (u <- with(df, xtabs(sus ~ id_r))) # IDs returned as a character vector: > names(u)[u == 0L] [1] "11" "16" "18" "19" "20" "21" "22" "24" "26" "30" "31" "32" "33" HTH, Dennis On Wed, Apr 6, 2011 at 2:10

[R] RPart Simple Diagram issues

2011-04-06 Thread Jackie Gleason
Hey everyone, So I am looking for a way to create a decision tree for a modeling class and I am not all that familiar with R. I thought I might be able to use RPart, but I can't get it to work. I want a simple tree with a parent that says the amount and each child has a percentage of likelyhood an

Re: [R] pass character vector in instrument field of get.hist.quote function

2011-04-06 Thread David Winsemius
On Apr 6, 2011, at 12:06 PM, algotr8der wrote: Hi Joshua, THank you for showing me how to use getSymbols. I am trying to follow the example you provided. However I am having some difficulty using the various combination of functions you have used. I tried to execute one step at a time a

[R] multivariate t distribution

2011-04-06 Thread statfan
I have been working the the pmt function in the {mnormt} package and which requires "S a positive definite matrix representing the scale matrix of the distribution, such that S*df/(df-2) is the variance-covariance matrix when df>2; a vector of length 1 is also allowed (in this case, d=1 is

Re: [R] unexpected sort order with merge

2011-04-06 Thread B77S
That is odd, I noticed some weird sorting with merge() a while back too and always am careful with it now. Fortunately, sort=FALSE seems to work the way one would think most of the time. Although, the following results seem weird too! (adding by="date" makes it not sort oddly, regardless of so

Re: [R] R, Ubuntu, package installation with non-zero exit status

2011-04-06 Thread B77S
FYI: The problem I had was that my modified .Rprofile text file was being read and had lines to load the libraries of packages that were not installed yet on this Ubuntu machine; I guess I copied the .Rprofile from my laptop. If you have similar problems, simply do this in command line: mv .Rpro

Re: [R] problem with all/all.equal

2011-04-06 Thread B77S
ifelse(length(unique(x))==1, "All Equal", "Not All Equal") -- View this message in context: http://r.789695.n4.nabble.com/problem-with-all-all-equal-tp3431956p3432167.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.or

[R] PARAFAC with PTAk in R?

2011-04-06 Thread Thomas Parr
This is not a programming question. I am looking for someone with experience using PTAk to perform PARAFAC (canonical decomposition CANDECOMP) analysis on fluorescence EEMs in [R]. I want to transition into R for this analysis since I already am using R for everything else. Most helpful would be

Re: [R] corSpatial and nlme

2011-04-06 Thread Ben Bolker
Robert Baer atsu.edu> writes: > > I noticed that ?corClasses in package nlme does not list corSpatial > among the standard classes. This might > either be intentional because corSpatial is not "standard" , > or it might be simply an oversight that needs correcting. > corSpatial is a virtu

Re: [R] Treatment of xml-stylesheet processing instructions in XML module

2011-04-06 Thread Duncan Temple Lang
Hi Adam To use XPath and getNodeSet on an XML document, you will want to use xmlParse() and not xmlTreeParse() to parse the XML content. So t = xmlParse(I(a)) # or asText = TRUE elem = getNodeSet(t, "/rss/channel/item")[[1]] works fine. You don't need to specify the root node, but rather the do

Re: [R] Calculated mean value based on another column bin from dataframe.

2011-04-06 Thread Fabrice Tourre
Thanks. Before I never used findInterval function. It seems very nice. On Wed, Apr 6, 2011 at 11:20 PM, David Winsemius wrote: > > On Apr 6, 2011, at 9:46 AM, Fabrice Tourre wrote: > >> Dear Henrique Dallazuanna, >> >> Thank you very much for your suggestion. >> >> It is obvious that your method

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Peter Ehlers
On 2011-04-06 15:21, Marius Hofert wrote: Haha, I found a hack (using the letter "l"): plot(0,0,main=expression(italic(X)[1]^bolditalic("l"))) To my eye, this is a bit neater: expression(italic(X)[1]^bold("/")) Peter Cheers, Marius __ R-help

Re: [R] Odp: Calculated mean value based on another column bin from dataframe.

2011-04-06 Thread Fabrice Tourre
This is extractly what I want. Thank you very much. On Wed, Apr 6, 2011 at 5:22 PM, Petr PIKAL wrote: > Hi > > > r-help-boun...@r-project.org napsal dne 06.04.2011 10:48:04: > >> Dear list, >> >> I have a dataframe with two column as fellow. >> >> > head(dat) >>        V1      V2 >>  0.15624 0.94

Re: [R] Help in kmeans

2011-04-06 Thread raji sankaran
Hi, I have herewith attached the results of the 2 commands. > *set.seed(1234) > kmeans_model<-kmeans((SepalLength+SepalWidth+PetalLength+PetalWidth),centers=3) > kmeans_model$cluster * [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 2 3

Re: [R] problem with all/all.equal

2011-04-06 Thread Peter Langfelder
On Wed, Apr 6, 2011 at 3:09 PM, Laura Smith wrote: > Hi! > > In a function, I may have an instance in which all elements are equal. > >> x <- rep(1,5) >> >> x > [1] 1 1 1 1 1 >> identical(x) > Error in .Internal(identical(x, y, num.eq, single.NA, attrib.as.set)) : >  'y' is missing >> all.equal(x)

Re: [R] Help in kmeans

2011-04-06 Thread raji sankaran
Hi, Thanks for the information.But , i am already using set.seed().My problem is that, when i use column names instead of column indices, the result seems to be less accurate consistently.Hence, we wanted to understand how kmeans differentiates between column names and column indices. Is there a

Re: [R] glm predict on new data

2011-04-06 Thread Brian Diggs
On 4/6/2011 2:17 PM, dirknbr wrote: I am aware this has been asked before but I could not find a resolution. I am doing a logit lg<- glm(y[1:200] ~ x[1:200,1],family=binomial) glm (and most modeling functions) are designed to work with data frames, not raw vectors. Then I want to predict

Re: [R] glm predict on new data

2011-04-06 Thread Tóth Dénes
Dear Dirk, You should avoid indexing in the glm call so that the name of the terms will not contain the indexing part. (Check str(lg) in your example.) A more preferred solution uses predefined data frames in the original calls: n <- 250 x <- rnorm(n) noise <- rnorm(n,0,0.3) y <- round(exp(x+nois

[R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Marius Hofert
Haha, I found a hack (using the letter "l"): plot(0,0,main=expression(italic(X)[1]^bolditalic("l"))) Cheers, Marius __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

[R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Marius Hofert
thickness looks good, but length... it should be something in between the following two: plot(0,0,main=expression(italic(X)[1]^bolditalic("'"))) plot(0,0,main=expression(italic(X)[1]^bolditalic("|"))) On 2011-04-07, at 24:08 , David Winsemius wrote: > > On Apr 6, 2011, at 5:58 PM, Marius Hofe

[R] Fisher's Exact test

2011-04-06 Thread Jim Silverton
Hello, I have a matrix, X2 ith 2 columns and I want to do the fisher's exact test on each row. However, it is too slow and I would like to use the sage.testsage command from the library called sage.test(datasnp[,1], datasnp[,2], n1 =100, n2 =100) -- Thanks, Jim. [[alternative HTML versi

[R] Fisher exact test approximation?

2011-04-06 Thread Jim Silverton
Hello, I have a matrix, X2 ith 2 columns and I want to do the fisher's exact test on each row. However, it is too slow and I would like to use the sage.testsage command from the library called (sagenhaft). I used: sage.test(X2[,1], X2[,2], n1 =100, n2 =100) but the pvalues histograms does not loo

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread David Winsemius
On Apr 6, 2011, at 5:58 PM, Marius Hofert wrote: Dear Peter, Dear David, this is also what I tried: plot(0,0,main=expression(italic(X) [1]^minute)) [as suggested by Peter]. The problem is that the prime seems so small/short when used with "^". Is there a way to get a thicker/larger prime?

[R] problem with all/all.equal

2011-04-06 Thread Laura Smith
Hi! In a function, I may have an instance in which all elements are equal. > x <- rep(1,5) > > x [1] 1 1 1 1 1 > identical(x) Error in .Internal(identical(x, y, num.eq, single.NA, attrib.as.set)) : 'y' is missing > all.equal(x) Error in is.expression(x) : 'x' is missing > I don't care what par

[R] corSpatial and nlme

2011-04-06 Thread Robert Baer
I noticed that ?corClasses in package nlme does not list corSpatial among the standard classes. This might either be intentional because corSpatial is not "standard" , or it might be simply an oversight that needs correcting. -- Robert W. Baer, Ph.D. Pro

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Marius Hofert
Dear Peter, Dear David, this is also what I tried: plot(0,0,main=expression(italic(X)[1]^minute)) [as suggested by Peter]. The problem is that the prime seems so small/short when used with "^". Is there a way to get a thicker/larger prime? Cheers, Marius On 2011-04-06, at 23:22 , Peter Ehlers

[R] glm predict on new data

2011-04-06 Thread dirknbr
I am aware this has been asked before but I could not find a resolution. I am doing a logit lg <- glm(y[1:200] ~ x[1:200,1],family=binomial) Then I want to predict a new set pred <- predict(lg,x[201:250,1],type="response") But I get varying error messages or warnings about the different number

Re: [R] Calculated mean value based on another column bin from dataframe.

2011-04-06 Thread David Winsemius
On Apr 6, 2011, at 9:46 AM, Fabrice Tourre wrote: Dear Henrique Dallazuanna, Thank you very much for your suggestion. It is obvious that your method is better than me. Is it possible to use cut, table,by etc? Whether there is some aggregate function in R can do this? Thanks. On Wed, Apr 6,

Re: [R] Teradata ODBC driver

2011-04-06 Thread Peter Ehlers
On 2011-04-06 11:23, William Poling wrote: Hi. I have had this URL passed to me in order to obtain the necessary driver to connect my R application to our Teradata warehouse, however, the URL does not seem to exist anymore, my internet explorer browser fails to connect for some reason. http

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread David Winsemius
On Apr 6, 2011, at 5:14 PM, Marius Hofert wrote: Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: Not all of us read LaTeX, so this is my initial guess at what you are requesting. The "*" after the '1'

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Peter Ehlers
see inline; On 2011-04-06 14:22, Peter Ehlers wrote: On 2011-04-06 14:14, Marius Hofert wrote: Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=e

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Peter Ehlers
On 2011-04-06 14:14, Marius Hofert wrote: Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expressio

[R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-06 Thread Marius Hofert
Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expression(italic(X)[1]*minute)) Any suggestions? C

Re: [R] Getting number of students with zeroes in long format

2011-04-06 Thread Christopher Desjardins
On Wed, Apr 6, 2011 at 4:03 PM, Douglas Bates wrote: > On Wed, Apr 6, 2011 at 3:44 PM, Christopher Desjardins > wrote: > > Hi, > > I have longitudinal school suspension data on students. I would like to > > figure out how many students (id_r) have no suspensions (sus), i.e. have > a > > code of

[R] mgp.axis.labels

2011-04-06 Thread Judith Flores
Hello, I am trying to use mgp.axis labels to locate the x-xis at a different distance from the one specified for the y-axis. I know I could use other functions such as mtext or axis. But I am curious to know about how to use 'mgp'axis.labels' from the Hmisc package. I tried following the exa

[R] help on pspline in coxph

2011-04-06 Thread Lei Liu
Hi there, I have a question on how to extract the linear term in the penalized spline in coxph. Here is a sample code: n=100 set.seed(1) x=runif(100) f1 = cos(2*pi*x) hazard = exp(f1) T = 0 for (i in 1:100) { T[i] = rexp(1,hazard[i]) } C = runif(n)*4 cen = T<=C y =

Re: [R] ROCR - best sensitivity/specificity tradeoff?

2011-04-06 Thread David Winsemius
On Apr 6, 2011, at 2:27 PM, Christian Meesters wrote: Hi, My questions concerns the ROCR package and I hope somebody here on the list can help - or point me to some better place. When evaluating a model's performane, like this: pred1 <- predict(model, ..., type="response") pred2 <- predi

Re: [R] Getting number of students with zeroes in long format

2011-04-06 Thread Douglas Bates
On Wed, Apr 6, 2011 at 3:44 PM, Christopher Desjardins wrote: > Hi, > I have longitudinal school suspension data on students. I would like to > figure out how many students (id_r) have no suspensions (sus), i.e. have a > code of '0'. My data is in long format and the first 20 records look like > t

Re: [R] Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Alexander Engelhardt
Am 06.04.2011 22:02, schrieb Walter Anderson: I have cobbled together the following logic. It works but is very slow. I'm sure that there must be a better r-specific way to implement this kind of thing, but have been unable to find/understand one. Any help would be appreciated. hh.sub <- househo

Re: [R] Getting number of students with zeroes in long format

2011-04-06 Thread Jorge Ivan Velez
Hi Chris, Is this what you have in mind? > sum(with(yourdata, tapply(sus, id_r, function(x) any(x==0 [1] 13 HTH, Jorge On Wed, Apr 6, 2011 at 4:44 PM, Christopher Desjardins <> wrote: > Hi, > I have longitudinal school suspension data on students. I would like to > figure out how many stu

Re: [R] Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Phil Spector
Walter - Since your codes represent numbers, you could use something like this: chk = as.numeric((hh.sub$HHFAMINC) hh.sub$CS_FAMINC = cut(chk,c(-10,0,5,10,15,17,18),labels=c(0,1:5)) - Phil Spector Statistical Com

Re: [R] Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Joshua Wiley
Hi Walter, Take a look at the function ?cut. It is designed to take a continuous variable and categorize it, and will be much simpler and faster. The only qualification is that your data would need to be numeric, not character. However, if your only values are the ones you put in quotes in your

Re: [R] Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Duncan Murdoch
On 06/04/2011 4:02 PM, Walter Anderson wrote: I have cobbled together the following logic. It works but is very slow. I'm sure that there must be a better r-specific way to implement this kind of thing, but have been unable to find/understand one. Any help would be appreciated. hh.sub<- ho

[R] Getting number of students with zeroes in long format

2011-04-06 Thread Christopher Desjardins
Hi, I have longitudinal school suspension data on students. I would like to figure out how many students (id_r) have no suspensions (sus), i.e. have a code of '0'. My data is in long format and the first 20 records look like the following: > suslm[1:20,c(1,7)] id_r sus 11 0 15 10 16

Re: [R] Cannot install pakcage RMySQL

2011-04-06 Thread Phil Spector
You need to install the mysql client development libraries. On SUSE systems, I believe the package is called libmysqlclient-devel . - Phil Spector Statistical Computing Facility

Re: [R] Cannot install pakcage RMySQL

2011-04-06 Thread Radhouane Aniba
and then I installed RMySQL from R itself using install.packages Cheers 2011/4/6 Radhouane Aniba > Alon, I remember having the same problem than you, but I am using Ubuntu > > I solved that by installing libmysqlclient16-dev using "sudo apt-get > install libdbd-mysql libmysqlclient16-dev" >

Re: [R] Cannot install pakcage RMySQL

2011-04-06 Thread Radhouane Aniba
Alon, I remember having the same problem than you, but I am using Ubuntu I solved that by installing libmysqlclient16-dev using "sudo apt-get install libdbd-mysql libmysqlclient16-dev" I don't know what command equivalet you have in Suse Radhouane 2011/4/6 alon.benari > Hello All, > > I h

[R] Sweave Cairo driver?

2011-04-06 Thread Liviu Andronic
Dear all I would like to use Sweave with the Cairo() graphics device instead of pdf(), since the former supports Unicode, allows for easier font selection out of a greater range of available fonts, and automatically embeds fonts into the resulting PDF. Following this older discussion [1], has anyo

[R] Need a more efficient way to implement this type of logic in R

2011-04-06 Thread Walter Anderson
I have cobbled together the following logic. It works but is very slow. I'm sure that there must be a better r-specific way to implement this kind of thing, but have been unable to find/understand one. Any help would be appreciated. hh.sub <- households[c("HOUSEID","HHFAMINC")] for (indx i

[R] Wald test with inequality constraints

2011-04-06 Thread sébastien saegesser
Dear Helpers, I need to do a spanning test with short sale constraints - so I have to impose and test multiple inequality restrictions to my panel regression model. I looked at several methodologies and for my research the most efficiency methodology is to a Wald test as proposed in: Econometr

[R] Odp: Calculated mean value based on another column bin from dataframe.

2011-04-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.04.2011 10:48:04: > Dear list, > > I have a dataframe with two column as fellow. > > > head(dat) >V1 V2 > 0.15624 0.94567 > 0.26039 0.66442 > 0.16629 0.97822 > 0.23474 0.72079 > 0.11037 0.83760 > 0.14969 0.91312 > > I want to ge

Re: [R] Calculated mean value based on another column bin from dataframe.

2011-04-06 Thread Fabrice Tourre
Dear Henrique Dallazuanna, Thank you very much for your suggestion. It is obvious that your method is better than me. Is it possible to use cut, table,by etc? Whether there is some aggregate function in R can do this? Thanks. On Wed, Apr 6, 2011 at 2:16 PM, Henrique Dallazuanna wrote: > Try t

[R] Treatment of xml-stylesheet processing instructions in XML module

2011-04-06 Thread Adam Cooper
Hello again, Another stumble here that is defeating me. I try: a<-readLines(url("http://feeds.feedburner.com/grokin";)) t<-XML::xmlTreeParse(a, ignoreBlanks=TRUE, replaceEntities=FALSE, asText=TRUE) elem<- XML::getNodeSet(XML::xmlRoot(t),"/rss/channel/item")[[1]] And I get: Start tag expected, '<

Re: [R] R and multithread

2011-04-06 Thread Bert Gunter
How about googling it?!! "R multithread" " R Parallel processing" both got numerous apprently relevant hits. Also please familiarize yourself with CRAN's task views, where you will find HighPerformanceComputing. -- Bert On Wed, Apr 6, 2011 at 5:27 AM, David martin wrote: > Hello, > Sorry if t

[R] Teradata ODBC driver

2011-04-06 Thread William Poling
Hi. I have had this URL passed to me in order to obtain the necessary driver to connect my R application to our Teradata warehouse, however, the URL does not seem to exist anymore, my internet explorer browser fails to connect for some reason. http://downloads.teradata.com/download/applicatio

[R] ROCR - best sensitivity/specificity tradeoff?

2011-04-06 Thread Christian Meesters
Hi, My questions concerns the ROCR package and I hope somebody here on the list can help - or point me to some better place. When evaluating a model's performane, like this: pred1 <- predict(model, ..., type="response") pred2 <- prediction(pred1, binary_classifier_vector) perf <- performance(

[R] smoothing bathymetry

2011-04-06 Thread Jens
Dear R Users, Using the following R-script I created the first image > require(akima) > require(spatial) > dep <- interp(long, lat, depth, xo=seq(1,990,10), yo=seq(1,990,10), + extrap=FALSE, ncp=0,duplicate = "mean", dupfun = NULL) http://r.789695.n4.nabble.com/file/n3431391/Rpics.bmp W

[R] Odp: Decimal Accuracy Loss?

2011-04-06 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 06.04.2011 17:33:48: > This is hopefully a quick question on decimal accuracy. Is any > decimal accuracy lost when casting a numeric vector as a matrix? And > then again casting the result back to a numeric? > > I'm finding that my calculation values

Re: [R] pass character vector in instrument field of get.hist.quote function

2011-04-06 Thread algotr8der
Hi Joshua, THank you for showing me how to use getSymbols. I am trying to follow the example you provided. However I am having some difficulty using the various combination of functions you have used. I tried to execute one step at a time as follows - I have a ticker vector that looks like the f

[R] Cannot install pakcage RMySQL

2011-04-06 Thread alon.benari
Hello All, I have a technical difficulty installing RMySQL. I am running openSUSE11.1 and R 2.12 I have installed MySQL from the website. and following installation , as root This is the part where trouble begin, .. checking mysql.h usability... no checking mysql.h presence... no checking for

[R] How to call data elements

2011-04-06 Thread Wonjae Lee
Hi, I have a stupid and simple question. Please forgive me. In an example below, please tell me how to call "1947" in mydata. Thank you in advance. Wonjae > mydata [[1]] [1] "1947""83" "234.289" "235.6" "159" "107.608" "1947" [8] "60.323" > mydata[[1],1] error:unex

[R] data smoothing

2011-04-06 Thread stefano.giampiccolo
Good morning, I have a time serie of clinical data. I know, from the literature, that it must have a linear trend, without seasonal oscillations. Can I use LOESS to have a qualitative confirm? I have only 15 mensurations: how should I choose the smoothing parameter? Thanks, best reguards Stefano Gi

[R] Curious treatment of entities in xmlTreeParse

2011-04-06 Thread Adam Cooper
Hello! I am not experienced enough to know whether I have found a bug or whether I am just ignorant. I have been trying to use the tm package to read in material from RSS 2.0 feeds, which has required grappling with writing a reader for that flavour of XML. I get an error - "Error : 1: EntityRef:

[R] effect sizes

2011-04-06 Thread netrunner
Dear all, I used the friedman.test.with.post.hoc in my analysis to compare the scores of three groups , but I would like to compute also the effect sizes. Anyone can help me? thank you net -- View this message in context: http://r.789695.n4.nabble.com/effect-sizes-tp3431058p3431058.html Sent f

Re: [R] pass character vector in instrument field of get.hist.quote function

2011-04-06 Thread algotr8der
Hi Joshua, Thank you for showing me how to use the getSymbols function. So I tried the following without success - > tickers [1] "SPY" "DIA" "IWM" "SMH" "OIH" "XLY" "XLP" "XLE" "XLI" "XLB" "XLK" "XLU" "XLV" [14] "QQQ" > str(tickers) chr [1:14] "SPY" "DIA" "IWM" "SMH" "OIH" "XLY" "XLP" "XLE" ..

[R] read BUFR format radar data

2011-04-06 Thread flore.mounier
Dear all, I am looking for a way to open *Binary Universal Form for the Representation of meteorological data* (*BUFR*) radar data with R software and I am wondering if their is any package that could help on this task. I have looked without success in the question section. Thanks in advance f

Re: [R] Examples of web-based Sweave use?

2011-04-06 Thread Matt Shotwell
That's an interesting idea. I had written a long email describing a proof-of-concept, but decided to post is to the website below instead. http://biostatmatt.com/archives/1184 Matt On 04/04/2011 07:31 AM, carslaw wrote: I appreciate that this is OT, but I'd be grateful for pointers to example

[R] RMySQL query Help

2011-04-06 Thread Radhouane Aniba
Hello everyone, I am using RMySQL for a project and I have to deal with a complicated query here it is : tmp2 <-sprintf(paste("select Score from YR.Transcription_Factor inner join YR.Promoter on YR.Transcription_Factor. Promoter_idPromoter=YR.Promoter.idPromoter inner join YR.GP_BIS on YR.

Re: [R] Creating a symmetric contingency table from two vectors with different length of levels in R

2011-04-06 Thread suparna mitra
Dear Andrija, Thank you very much for your quick reply. It looks like working. Thanks again, Suparna. On Wed, Apr 6, 2011 at 2:11 PM, andrija djurovic wrote: > Hi: > > Here is one solution: > > a<-factor(c(1,2,4,5,6)) > b<-factor(c(2,2,4,5,5)) > b1<-factor(b,levels=c(levels(b),levels(a)[levels(a

Re: [R] Search arrays based on similar values

2011-04-06 Thread mjdubya
Petr, Perfect! Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Search-arrays-based-on-similar-values-tp3429381p3430906.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://

[R] R and multithread

2011-04-06 Thread David martin
Hello, Sorry if this question has been posted before but could't find out exactly an answer to the question I'm doing bioinformatics and doing small RNA sequencing that make use of packages such as DESeq and EDGE. For those familiar with this data you will notice that you end up having la

Re: [R] How to call data elements

2011-04-06 Thread B77S
assuming this is from a list mydata[[1]][1] and mydata[[1]][7] ?? Wonjae Lee wrote: > > Hi, > > I have a stupid and simple question. > Please forgive me. > > In an example below, please tell me how to call "1947" in mydata. > Thank you in advance. > > Wonjae > >> mydata > [[

Re: [R] Grid on Map

2011-04-06 Thread MacQueen, Don
Possibly something similar to abline(v=seq(long.min, long.max, length=3) abline(h=seq(lat.min, lat.max, length=3) ? The above will add vertical and horizontal lines to an existing plot, and assumes that the plot is in long/lat coordinates. Of course, this ignores the fact that long/lat is no

[R] A zoo related question

2011-04-06 Thread Bogaso Christofer
Dear all, please consider my following workbook: library(zoo) lis1 <- vector('list', length = 2) lis2 <- vector('list', length = 2) lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1) lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency = 12)

Re: [R] A zoo related question

2011-04-06 Thread Gabor Grothendieck
On Wed, Apr 6, 2011 at 3:40 PM, Bogaso Christofer wrote: > Dear all, please consider my following workbook: > > > > library(zoo) > > lis1 <- vector('list', length = 2) > > lis2 <- vector('list', length = 2) > > lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1) > > lis1[[

[R] A zoo related question

2011-04-06 Thread Bogaso Christofer
Dear all, please consider my following workbook: library(zoo) lis1 <- vector('list', length = 2) lis2 <- vector('list', length = 2) lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1) lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency = 12)

[R] [SOLVED] Re: Use of the dot.dot.dot option in functions.

2011-04-06 Thread KENNETH R CABRERA
Thank you very much for your help. It works very well! Still, it is not very clear why the "replicate" function do not take the "..." arguments like they should. - Mensaje original - De: Duncan Murdoch Fecha: Miércoles, 6 de Abril de 2011, 11:56 am Asunto: Re: [R] Use of the dot.dot.dot

[R] unexpected sort order with merge

2011-04-06 Thread Johann Hibschman
`merge` lists sorted as if by character, not by the actual class of the by-columns. > tmp <- merge(data.frame(f=ordered(c("a","b","b","a","b"), levels=c("b","a")), x=1:5), data.frame(f=ordered(c("a","b"),

Re: [R] metaplot

2011-04-06 Thread Scott Chamberlain
What about the metafor package? Or just create your own plot. For example, using ggplot2 package: limits <- aes(ymax = OR + (OR - 95%LCI), ymin = OR - (OR - 95%LCI)) ggplot(dataframe, aes(x = Study.Name, y = OR)) + geom_point() + geom_errobar(limits) Best, Scott On Wednesday, April 6, 2011

Re: [R] Examples of web-based Sweave use?

2011-04-06 Thread Tal Galili
In case you haven't seen it, it seems that you've got a post answering your question: http://biostatmatt.com/archives/1184 Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-727

Re: [R] General binary search?

2011-04-06 Thread Martin Morgan
On 04/04/2011 01:50 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Stavros Macrakis Sent: Monday, April 04, 2011 1:15 PM To: r-help Subject: [R] General binary search? Is there a generic binary search rou

Re: [R] Use of the dot.dot.dot option in functions.

2011-04-06 Thread Duncan Murdoch
On 06/04/2011 12:04 PM, KENNETH R CABRERA wrote: Hi R users: I try this code, where "fun" is a parameter of a random generating function name, and I pretend to use "..." parameter to pass the parameters of different random generating functions. What am I doing wrong? f1<-function(nsim=20,n=10,

[R] metaplot

2011-04-06 Thread cheba meier
Dear all, I have a four variable: Stuy.Name, OR, 95%LCI and 95%UCI and I would like to create a meta analysis plot. I can't use meta.MH function in metaplot because I do not have n.trt, n.ctrl, col.trt, col.ctrl are not available! Is there an alternative way to do it? Many thanks in advance, Cheb

Re: [R] Decimal Accuracy Loss?

2011-04-06 Thread peter dalgaard
On Apr 6, 2011, at 17:58 , Petr Savicky wrote: > On Wed, Apr 06, 2011 at 11:33:48AM -0400, Brigid Mooney wrote: >> This is hopefully a quick question on decimal accuracy. Is any >> decimal accuracy lost when casting a numeric vector as a matrix? And >> then again casting the result back to a nu

Re: [R] summing values by week - based on daily dates - but with some dates missing

2011-04-06 Thread Dimitri Liakhovitski
Sorry - never mind. It turns out I did not load the zoo package. That was the reason. On Wed, Apr 6, 2011 at 12:14 PM, Dimitri Liakhovitski wrote: > Guys, sorry to bother you again: > > I am running everything as before (see code below - before the line > with a lot of ##). But now I am getti

  1   2   >