[R] wavelets

2011-07-04 Thread user123
I'm new to the topic of wavelets. When I tried to use the mra function in the wavelets package, the data is not getting compressed. eg. if the original data has 500 values , the output data also has the same. However in MATLAB, depending on the level of decompositon, the data gets compressed. How

Re: [R] superimposing different plot types in lattice panel.superpose

2011-07-04 Thread Dennis Murphy
Hi: Here's one way out, if I read your intention properly... plot1 - xyplot(y ~ x, data = modelresults, groups = model, type = 'l', xlim = c(0, 10), ylim = c(0.5, 3.5)) plot2 - xyplot(y ~ x, data = data, groups = model, type = 'p', pch = 16, xlim =

Re: [R] Poisson GLM with a logged dependent variable...just asking for trouble?

2011-07-04 Thread ONKELINX, Thierry
Dear Mark, I think you want glm(DV ~ log10(IV), family=poisson) Note that the poisson family uses the log-link by default. Hence you don't need to log-transform DV yourself. Best regards, Thierry ir. Thierry Onkelinx

Re: [R] wavelets

2011-07-04 Thread Jeff Newmiller
Study the topic more carefully, I suppose. My understanding is that wavelets do not in themselves compress anything, but because they sort out the interesting data from the uninteresting data, it can be easy to toss the uninteresting data (lossy data compression). Perhaps you should understand

Re: [R] RWinEdt problem

2011-07-04 Thread Uwe Ligges
On 04.07.2011 06:56, Simon Knapp wrote: ... I just tried fiddling with the appearance settings, and when I uncheck Custom Colors under Document Tabs, the file names reappear, though I don't get the coloring I am used to (red for modified, green for unmodified). Right. That is fixed in

[R] Wrong environment when evaluating and expression?

2011-07-04 Thread Joshua Wiley
Hi All, I have constructed two expressions (e1 e2). I can see that they are not identical, but I cannot figure out how they differ. ### dat - mtcars e1 - expression(with(data = dat, lm(mpg ~ hp))) e2 - as.expression(substitute(with(data = dat, lm(f)), list(f = mpg ~ hp))) str(e1)

[R] [R-pkgs] rgdal 0.7-1 release

2011-07-04 Thread Roger Bivand
A new release of rgdal, a package providing bindings for the Geospatial Data Abstraction Library for reading and writing spatial data, has reached CRAN. This release changes the error handling mechanisms, and is more fully described in a posting on R-sig-geo:

[R] Unusual graph- modified wind rose perhaps?

2011-07-04 Thread John Kane
In a OpenOffice.org forum someone was asking if the spreadsheet could graph this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html I didn't think it could. :) I don't think I've ever seen exactly this layout. Does anyone know if there is anything in R that does a graph like

Re: [R] Wrong environment when evaluating and expression?

2011-07-04 Thread Gabor Grothendieck
On Mon, Jul 4, 2011 at 4:11 AM, Joshua Wiley jwiley.ps...@gmail.com wrote: Hi All, I have constructed two expressions (e1 e2).  I can see that they are not identical, but I cannot figure out how they differ. ### dat - mtcars e1 - expression(with(data = dat, lm(mpg ~ hp))) e2

Re: [R] Unusual graph- modified wind rose perhaps?

2011-07-04 Thread ONKELINX, Thierry
Dear John, You can get pretty close with ggplot2. Best regards, Thierry library(ggplot2) dataset - data.frame(Name = LETTERS[1:26]) dataset$Score - runif(nrow(dataset)) dataset$Category - cut(dataset$Score, breaks = c(-Inf, 0.33, 0.66, Inf), labels = c(Bad, Neutral, Good)) dataset$Name -

Re: [R] Unusual graph- modified wind rose perhaps?

2011-07-04 Thread Jim Lemon
On 07/04/2011 09:21 PM, John Kane wrote: In a OpenOffice.org forum someone was asking if the spreadsheet could graph this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html I didn't think it could. :) I don't think I've ever seen exactly this layout. Does anyone know if there

[R] Prevent 'R CMD check' from reporting NA/NA_character_ missmatch?

2011-07-04 Thread Johannes Graumann
Hello, I'm writing a package am running 'R CMD check' on it. Is there any way to make 'R CMD check' not warn about a missmatch between 'NA_character_' (in the function definition) and 'NA' (in the documentation)? Thanks for any help. Sincerely, Joh

Re: [R] Copying to R a rectangular array from a Java class

2011-07-04 Thread Sanketh
Hi, can you please tel me how to retrieve String two dimensional array as like sapply? -- View this message in context: http://r.789695.n4.nabble.com/Copying-to-R-a-rectangular-array-from-a-Java-class-tp3486167p3643223.html Sent from the R help mailing list archive at Nabble.com.

[R] loop in optim

2011-07-04 Thread EdBo
Hi May you help me correct my loop function. I want optim to estimates al_j; au_j; sigma_j; b_j by looking at 0 to 20, 21 to 40, 41 to 60 data points. The final result should have 4 columns of each of the estimates AND 4 rows of each of 0 to 20, 21 to 40, 41 to 60. ###MY code is n=20 runs=4

[R] Protecting R code

2011-07-04 Thread Vaishali Sadaphal
Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not like anyone to be able to read the code. I am searching for ways to protect R code. I would like to create a .exe kind of file which could

[R] How to build a matrix of number of appearance?

2011-07-04 Thread UriB
I have a matrix of claims at year1 that I get simply by claims-read.csv(file=Claims.csv) qq1-claims[claims$Year==Y1,] I have MemberID and ProviderID for every claim in qq1 both are integers An example for the type of questions that I want to answer is how many times ProviderID number 345

[R] writeLines + foreach/doMC

2011-07-04 Thread Ramzi TEMANNI
Hi I'm processing sequencing data trying to collapsing the locations of each unique sequence and write the results to a file (as storing that in a table will require 10GB mem at least) so I wrote a function that, given a sequence id, provide the needed line to be stored library(doMC) # load

Re: [R] wavelets

2011-07-04 Thread Mike Marchywka
From: jdnew...@dcn.davis.ca.us Date: Mon, 4 Jul 2011 00:45:41 -0700 To: tyagi...@gmail.com; r-help@r-project.org Subject: Re: [R] wavelets Study the topic more carefully, I suppose. My understanding is that wavelets do not in themselves compress anything, but because they sort out the

Re: [R] Prevent 'R CMD check' from reporting NA/NA_character_ missmatch?

2011-07-04 Thread Prof Brian Ripley
On Mon, 4 Jul 2011, Johannes Graumann wrote: Hello, I'm writing a package am running 'R CMD check' on it. Is there any way to make 'R CMD check' not warn about a missmatch between 'NA_character_' (in the function definition) and 'NA' (in the documentation)? Be consistent Why do you

Re: [R] writeLines + foreach/doMC

2011-07-04 Thread Mario Valle
Read something about parallel processing and how I/O should be done by a single process. Suggestion: write a different file from each thread then combine the results with cat or similar. Hope it helps mario On 04-Jul-11 11:58, Ramzi TEMANNI wrote: Hi I'm

Re: [R] extracting data

2011-07-04 Thread Ana Kolar
Thanks! That works well. Best, Ana From: Peter Ehlers ehl...@ucalgary.ca To: Ana Kolar annako...@yahoo.com Cc: Sarah Goslee sarah.gos...@gmail.com; R r-help@r-project.org Sent: Tuesday, 28 June 2011, 19:37 Subject: Re: [R] extracting data On 2011-06-28 09:54,

Re: [R] Unusual graph- modified wind rose perhaps?

2011-07-04 Thread John Kane
Very pretty Thierry, I was wondering if ggplot2 could do something like it but my knowledge of ggplot2 is far to little to attempt it myself. I'm going to really have to spend some time on that code. Thanks --- On Mon, 7/4/11, ONKELINX, Thierry thierry.onkel...@inbo.be wrote: From:

Re: [R] cumulative incidence plot vs survival plot

2011-07-04 Thread rgeskus
Note that most of the nonparametric and semi-parametric competing risks analyses can be performed within the survival package. This includes nonparametric estimation of cause-specific cumulative incidence curves and the log-rank type test. It suffices to create a weighted data set as explained in

Re: [R] Protecting R code

2011-07-04 Thread Uwe Ligges
On 04.07.2011 09:47, Vaishali Sadaphal wrote: Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not like anyone to be able to read the code. I am searching for ways to protect R code. I would

Re: [R] Protecting R code

2011-07-04 Thread Barry Rowlingson
On Mon, Jul 4, 2011 at 8:47 AM, Vaishali Sadaphal vaishali.sadap...@tcs.com wrote: Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not like anyone to be able to read the code. At some

Re: [R] How to build a matrix of number of appearance?

2011-07-04 Thread David Winsemius
On Jul 4, 2011, at 5:48 AM, UriB wrote: I have a matrix of claims at year1 that I get simply by claims-read.csv(file=Claims.csv) qq1-claims[claims$Year==Y1,] I have MemberID and ProviderID for every claim in qq1 both are integers An example for the type of questions that I want to answer

Re: [R] Protecting R code

2011-07-04 Thread Spencer Graves
On 7/4/2011 7:28 AM, Uwe Ligges wrote: On 04.07.2011 09:47, Vaishali Sadaphal wrote: Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not like anyone to be able to read the code. I am

Re: [R] Protecting R code

2011-07-04 Thread Spencer Graves
Hello: On 7/4/2011 7:41 AM, Barry Rowlingson wrote: On Mon, Jul 4, 2011 at 8:47 AM, Vaishali Sadaphal vaishali.sadap...@tcs.com wrote: Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not

[R] modification of cross-validations in rpart

2011-07-04 Thread Katerine Goyer
Hello, I am using the rpart function (from the rpart package) to do a regression tree that would describe the behaviour of a fish species according to several environmental variables. For each fish (sampling unit), I have repeated observations of the response variable, which means that

[R] I need help for creating a timevar

2011-07-04 Thread kbr
Hi all! I have data in „Long“ format which I would like to reshape to „Wide“. I know that one possibility is the „reshape“ command, which needs a „timevar“. Data look as follows: There are approx. 3000 persons („IDENTITY“) and, for each person, there are between 2 and 20 events („EVENT“). For

Re: [R] Protecting R code

2011-07-04 Thread Vaishali Sadaphal
Hey All, Thank you so much for quick replies. Looks like translation to C/C++ is the only robust option. Do you think there exists any ready-made R to C translator? Thanks -- Vaishali Vaishali Paithankar Sadaphal Tata Consultancy Services Mailto: vaishali.sadap...@tcs.com Website:

Re: [R] Protecting R code

2011-07-04 Thread Mike Marchywka
Put it on rapache or otherwise server but this seems like a waste depending on what you are doing Server side is only good way but making c++ may be interesting test Sent from my Verizon Wireless BlackBerry -Original Message- From: Vaishali Sadaphal vaishali.sadap...@tcs.com Date: Mon,

[R] forecast: bias in sampling from seasonal Arima model?

2011-07-04 Thread Nicolas Chapados
Dear all, I stumbled upon what appears to be a troublesome issue when sampling from an ARIMA model (from Rob Hyndman's excellent 'forecast' package) that contains a seasonal AR component. Here's how to reproduce the issue. (I'm using R 2.9.2 with forecast 2.19; see sessionInfo() below). First

[R] Rpad library

2011-07-04 Thread ATANU
can anyone help me with a well documented tutorial on Rpad package? I need to do HTML programming in R.Can anyone help me with a tutorial? -- View this message in context: http://r.789695.n4.nabble.com/Rpad-library-tp3644041p3644041.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] For help in R coding

2011-07-04 Thread Bansal, Vikas
Dear sir, I have one more problem.Sorry to disturb you again. I have a data frame like this- Col1 Col2 Col3 Col4 1 0 14 0 0 02 4 2

Re: [R] Wrong environment when evaluating and expression?

2011-07-04 Thread Joshua Wiley
Thanks Gabor, that makes sense now. In case anyone else runs into something similar, I ended up just passing a character string of the formula so it could be coerced to a formula in the correct environment. Thanks again, Josh On Mon, Jul 4, 2011 at 4:26 AM, Gabor Grothendieck

Re: [R] For help in R coding

2011-07-04 Thread David Winsemius
On Jul 4, 2011, at 1:29 PM, Bansal, Vikas wrote: Dear sir, I have one more problem.Sorry to disturb you again. I have a data frame like this- Col1 Col2 Col3 Col4 1 0 14 0 0 0

Re: [R] How to build a matrix of number of appearance?

2011-07-04 Thread jim holtman
Here is another way: xx - data.frame(P = sample(5, 100, TRUE), M = sample(5, 100, TRUE), id = 1:100) require(data.table) xx - data.table(xx) # convert to data.table count - xx[ + , list(count = length(id)) + , by = list(M, P) + ] str(count) Classes

Re: [R] I need help for creating a timevar

2011-07-04 Thread Joshua Wiley
Hi Karen, As long as your IDENTITY column goes up in order, this should work: ## example data dat - data.frame(IDENTITY = rep(101:103, 3:1), EVENT = Event) dat$TIMEVAR - unlist(with(dat, tapply(EVENT, IDENTITY, seq_along))) ## Result dat See ?tapply and ?seq_along for some documentation Hope

Re: [R] Protecting R code

2011-07-04 Thread Barry Rowlingson
On Mon, Jul 4, 2011 at 5:48 PM, Vaishali Sadaphal vaishali.sadap...@tcs.com wrote: Hey All, Thank you so much for quick replies. Looks like translation to C/C++ is the only robust option. Do you think there exists any ready-made R to C translator? No, I think they are normally all born

Re: [R] SOLVED: superimposing different plot types in lattice panel.superpose

2011-07-04 Thread genghis
Thank you very much Dennis, that's wonderful. I tried it first without LatticeExtra and it didn't work, so yes that package is the key. Best, John -- View this message in context:

Re: [R] Rpad library

2011-07-04 Thread David Winsemius
On Jul 4, 2011, at 12:45 PM, ATANU wrote: can anyone help me with a well documented tutorial on Rpad package? I need to do HTML programming in R.Can anyone help me with a tutorial? Trivial Google searching produces this link:

Re: [R] Protecting R code

2011-07-04 Thread Steve Lianoglou
On Mon, Jul 4, 2011 at 2:04 PM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Mon, Jul 4, 2011 at 5:48 PM, Vaishali Sadaphal vaishali.sadap...@tcs.com wrote: Hey All, Thank you so much for quick replies. Looks like translation to C/C++ is the only robust option. Do you think

[R] How to merge two files

2011-07-04 Thread albert coster
Dear all, I have two files : seq.txt: NNATTAAAGGGC scores.txt : 0.8 0.7 0.3 0.5 0.6 0.5 0.01 0.9 0.3 0.8 I want output as following A 0.8 T 0.7 T 0.3 A 0.5 A 0.6 A 0.5 G 0.01 G 0.9 G 0.3 C 0.8 Where N are deleted and only A/T/G/C are appearing in a column. Thanks Albert 0.8 0.7

[R] placing multiple rows in a single row

2011-07-04 Thread Annemarie Verkerk
Dear people from the R help list, I have a question that I can't get my head around to start answering, that is why I am writing to the list. I have data in a format like this (tabs might look weird): John A1 1 0 1 John A2 111 John A3 100 Mary

[R] clustering based on most significant pvalues does not separate the groups!

2011-07-04 Thread pguilha
Hi all, I have some microarray data on 40 samples that fall into two groups. I have a value for 480k probes for each of those samples. I performed a t test (rowttests) on each row(giving the indices of the columns for each group) then used p.adjust() to adjust the pvalues for the number of tests

Re: [R] How to merge two files

2011-07-04 Thread Joshua Wiley
Dear Albert, Here is one way: tmp.scores - readLines(~/scores.txt) tmp.seq - readLines(~/seq.txt) tmp.seq - strsplit(gsub(N, , tmp.seq), )[[1]] genedat - data.frame(Sequence = tmp.seq, Scores = as.numeric(tmp.scores)) ## Yields genedat Sequence Scores 1 A 0.80 2 T 0.70 3

Re: [R] placing multiple rows in a single row

2011-07-04 Thread David Winsemius
On Jul 4, 2011, at 2:32 PM, Annemarie Verkerk wrote: Dear people from the R help list, I have a question that I can't get my head around to start answering, that is why I am writing to the list. I have data in a format like this (tabs might look weird): John A1 1 0 1 John

Re: [R] loop in optim

2011-07-04 Thread Joshua Wiley
Hi Edward, At least for me, your llik() function returns Inf for the starting values specified, so optim() never gets to estimate anything. You need to alter llik() or find starting parameters that work before worrying about getting the for loop working. Cheers, Josh On Mon, Jul 4, 2011 at

[R] R CMD SHLIB with ifort

2011-07-04 Thread Ted Rosenbaum
Hi, I am running Linux (64 bit) R, compiled under gnu compilers. I am looking to compile a Fortran program with the ifort (the intel compiler) and then be able to import that as a library into my version of R. I am using the flags FC=ifort and SHLIB_FCLD=ifort, however ifort does not seem to

Re: [R] R CMD SHLIB with ifort

2011-07-04 Thread Jeff Newmiller
I don't have any idea about linking Fortran to R, but if I did I am sure I would want complete command lines and error messages before I looked at your problem. --- Jeff Newmiller The . . Go Live...

Re: [R] modification of cross-validations in rpart

2011-07-04 Thread Weidong Gu
One way around hacking rpart is to write code to do K fold samples based on unit outside rpart, then build trees using training sets and summarize scores on testing sets. Weidong Gu On Mon, Jul 4, 2011 at 9:22 AM, Katerine Goyer katerine.go...@uqtr.ca wrote: Hello, I am using the

[R] FinCenter in timeSeries with merge, cbind and rbind

2011-07-04 Thread Kenneth Roy Cabrera Torres
Hi R users: When I try to merge or bind (cbind or rbind) two series, both with a FinCenter different that GMT, the result is GMT not the original financial center? What am I doing wrong? ## require(timeSeries) getRmetricsOptions(myFinCenter)

Re: [R] Low Pain Unicode Characters in pdf graph?

2011-07-04 Thread Liviu Andronic
On Sun, May 15, 2011 at 3:06 PM, ivo welch ivo.we...@gmail.com wrote: Dear R-experts---is there a relatively low-pain way to get unicode characters into a plot to a pdf device? Have you tried Cairo package or cairo_pdf()? Both are making use of Cairo, which uses UTF-8 and automatically embeds

[R] Stuck ...can't get sapply and xmlTreeParse working

2011-07-04 Thread eric
Can't seem to get the code below working. It gets stuck on line 24 inside the function hm; comments show the line in question. The function hm is called by sapply and is at the bottom of the code. Other stuff above line 24 works correctly including the first couple of lines of the function hm.

Re: [R] [R-SIG-Finance] FinCenter in timeSeries with merge, cbind and rbind

2011-07-04 Thread David Winsemius
On Jul 4, 2011, at 6:47 PM, Kenneth Roy Cabrera Torres wrote: Hi R users: When I try to merge or bind (cbind or rbind) two series, both with a FinCenter different that GMT, the result is GMT not the original financial center? It's not in the help(cbind.timeSeries) page but looking at the

[R] Seasonality of time series

2011-07-04 Thread Martin B.
Dear all, I have a time series of 10-day tropical rainfall data with a typical rainy and dry season. Is there a way to extract seasonal information with R, like the day of the start and end of each rainy season for each year? Martin Brandt University of Vienna -- View this message in

[R] Bad Confirmation String

2011-07-04 Thread Matilda E. Gogos
I just signed up for R-help 2 days ago, and received an *Invalid confirmation string:*2beb5b0883f29fae71a80fcb30324117ec9ece94 when confirming subscription. I am receiving e-mails in my inbox with about 40% of individual e-mails saying across the top this message may not have been sent by:

Re: [R] Stuck ...can't get sapply and xmlTreeParse working

2011-07-04 Thread jim holtman
The value of 'url.zill' is a vector of 407 character strings: Browse[1] str(url.zill) chr [1:407] http://www.zillow.com/webservice/GetDeepSearchResults.htm?zws-id=X1-ZWz1bup03e49vv_5kvb6address=10+PACER+LNcitystatezip=East+;| __truncated__ ... Isn't it supposed to be just a single file name?

[R] Fw: volcano plot.r

2011-07-04 Thread Ungku Akashah
Hello. My name is Akashah. i work at metabolic laboratory. From my study, i found that volcano plot can help a lot in my section.  i already studied about the volcano plot and get the coding to run in R software, unfortunately, there is may be something wrong with the coding. This is because  

Re: [R] Stuck ...can't get sapply and xmlTreeParse working

2011-07-04 Thread jim holtman
Probably this is what you want; convert the first column of 'new.add' to character and then use in the sapply. Now it seems to work in that data is read in, but the new error is that f is not defined. What is it supposed to be? x - as.character(new.add[[1]]) z - sapply(x, hm) Error in f$zpid

Re: [R] Protecting R code

2011-07-04 Thread Duncan Murdoch
On 11-07-04 3:47 AM, Vaishali Sadaphal wrote: Hi All, I need to give my R code to my client to use. I would like to protect the logic/algorithms that have been coded in R. This means that I would not like anyone to be able to read the code. R is an open source project, so providing ways for

Re: [R] loop in optim

2011-07-04 Thread EdBo
Hi I have re-worked on my likelihood function and it is now working(#the code is below#). May you help me correct my loop function. I want optim to estimates al_j; au_j; sigma_j; b_j by looking at 0 to 20, 21 to 40, 41 to 60 data points. The final result should have 4 columns of each of

[R] Create factor variable by groups

2011-07-04 Thread Mateus Rabello
Hi, suppose that I have the following data.frame: cnae4 cnpj 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 Y 24996 10020470 1 1 2 12 16 21 17 51 43 19 183 24996 10020470 69 91 79 92 91 77 90 96 98 108 891 36145 10020470 0 0 0 0 2 83 112 97 91 144 529 4

Re: [R] Prevent 'R CMD check' from reporting NA/NA_character_ missmatch?

2011-07-04 Thread Johannes Graumann
Prof Brian Ripley wrote: On Mon, 4 Jul 2011, Johannes Graumann wrote: Hello, I'm writing a package am running 'R CMD check' on it. Is there any way to make 'R CMD check' not warn about a missmatch between 'NA_character_' (in the function definition) and 'NA' (in the documentation)?