Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Berend Hasselman
On 09-09-2014, at 08:25, PO SU wrote: > > > I don't understand what's your meaning, do you mean that i should do some > file processing,(like writing a script) ,so that i could add # in any line i > wanted. > I think it is not convenient. > And, it does seems that there is no way to multi

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Pascal Oettli
No I don't mean this. Did you at least try the small example I provided? On Tue, Sep 9, 2014 at 3:25 PM, PO SU wrote: > > > I don't understand what's your meaning, do you mean that i should do some > file processing,(like writing a script) ,so that i could add # in any line i > wanted. > I thi

Re: [R] Problems with bstats::white.test()

2014-09-09 Thread Achim Zeileis
On Mon, 8 Sep 2014, Iuri Gavronski wrote: Hi, I am trying to test for heteroskedascity in an OLS model, but I am not able to run the white.test() if the model has dummy variables built from factors. Any suggestions? The White test is equivalent to the Breusch-Pagan test with an auxiliary mod

[R] How to identify outliers with values five times 99th percentile

2014-09-09 Thread Kuma Raj
I have a data frame with some extreme values which I wish to identify and repeat an analysis without these extreme values. How could I identify several columns with values which are 5 times higher than the 99th percentile? Sample data is pasted below. > dput(df) structure(list(ad1 = c(98, 6.9, 8

Re: [R] How to identify outliers with values five times 99th percentile

2014-09-09 Thread Rui Barradas
Hello, Try the following. out <- lapply(df, function(x){ qq <- quantile(x, probs = 0.99) which(x > 5*qq) }) out The list 'out' contains indices to the outliers. You can now have those outliers as follows df[out[[1]], 1] # first column Etc. Hope this helps, Rui Barradas

Re: [R] sequential input script dataframe process functionality

2014-09-09 Thread rl
On 2014-09-08 15:47, William Dunlap wrote: d <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) i <- 1 # possible output of menu(unique(d$Choices)) d[ d$Choices[i] == d$Choices, ] # Choices X #1 One 1 #3 One 3 testd <- data.frame(Choices=c("One","Two","One","Three"), X=1:4) t

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Duncan Murdoch
On 08/09/2014, 11:14 PM, Jeff Newmiller wrote: > There are no multi line comment markers in R. However, since you are always > referring to RStudio you might want to look into roxygen, since their editor > supports that tool. RStudio has a command to comment a block: it's in the Code menu. (On

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Martin Maechler
> "PS" == PO SU > on Tue, 9 Sep 2014 10:49:32 +0800 writes: PS> Dear expeRts,    I find it's terrible  when  i want to PS> comment multi paragraph (e.g.  a 30 lines function) , i PS> have to comment each line with #,  is there any good way PS> to do that ?    I invest

Re: [R] using edit to extract codes from vignette failed

2014-09-09 Thread William Dunlap
> i don't know how to report a bug to Rstudio Have you tried clicking on 'Help', then on 'RStudio Support' in the menu that pops up? Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Sep 8, 2014 at 7:07 PM, PO SU wrote: > > > OK, i get it, i should set the editor argument , i don't know ho

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Bos, Roger
What I do in cases like that is wrap the code in a FALSE statement so it won't get executed: its easy to add and remove as needed. If (FALSE) { ...Code to exclude } *** This message and any attachments are for the named person'

Re: [R] splitting data

2014-09-09 Thread eliza botto
Dear Davis, Dennis and John, I am thankyou that you replied. I'll take care of it in future. Eliza > Date: Mon, 8 Sep 2014 17:36:30 -0700 > Subject: Re: [R] splitting data > From: djmu...@gmail.com > To: eliza_bo...@hotmail.com > > Hi Eliza: > > Here are a few potential solutions. Given that y

Re: [R] KDE routines for data that is aggregated

2014-09-09 Thread David L Carlson
If the x and y values are regularly spaced, you could use contour() or persp() to plot the densities. If they are not, you can use density(), loess(), gam(), kriging another function to estimate a smooth surface for the values and then estimate the values over a regular grid and then plot with c

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Gjalt-Jorn Peters
In R-studio, you can also select whatever you want to comment out, and press CTRL-SHIFT-C to comment the selection in one go. To uncomment it all in one go again, you can select it again and press CTRL-SHIFT-C again. Gjalt-Jorn On 2014-09-09 5:51, Pascal Oettli wrote: A workaround is to escap

[R] marketing-questionnaire with split-design

2014-09-09 Thread Norbert Dörrer
Dear Experts I'm quite new to the world of R; so maybe my question is kind of beginners... I am right now trying to analyse questionnaire data (CAWI) for producing a image/positioning map of the competitors of my company; when programming the CAWI, a split design was needed; every respondent had

[R] R, Big Data and books

2014-09-09 Thread Subba Rao
Hi, I am interested in R programming in the Big Data space. Are there any books that would be a good starting point for this career path? Predictive analysis is also an area I am interested in. Thank you in advance for any information and help. Subba Rao __

[R] Affinity Analysis at Product Category Level

2014-09-09 Thread anshuji
Hi - Need help to do product affinity analysis for a Retailer. Products are categorized into categories such as say Baby Care, Male Hair Care, Female Hair Care etc. I can do affinity analysis at the product level using Apriori algorithm. I get the support, confidence and lift and using this I g

[R] Sentence Splitting using R's openNLP library is not efficient

2014-09-09 Thread anshuji
Please suggest any efficient way/code of splitting text into sentences in R. Currently, I'm using openNLP library for the same, it is taking several hours to process 8,000+ records of twitter post/comments. Below is my R code for same: options(java.parameters = "-Xmx4g") library("NLP"); library

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Sven E. Templer
One way I know to do this is (in bash) to use a dummy variable and make the comment a multiline character string: dummy <- c(" This is my multiline comment or code block. ") or if printing does not disturb you, just use: " ... " Use ' if you have " in the block. Other workarounds are here, whic

[R] Import data from Excel to R

2014-09-09 Thread JAWADI Fredj
Hi I am a New user of R. Please, how to import data from Excel to R? Thanks, Best regards, Fredj, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Import data from Excel to R

2014-09-09 Thread Ista Zahn
Read the manual. http://cran.r-project.org/doc/manuals/r-release/R-data.html#Reading-Excel-spreadsheets Best, Ista On Sep 9, 2014 6:39 PM, "JAWADI Fredj" wrote: > Hi > I am a New user of R. > Please, how to import data from Excel to R? > Thanks, > Best regards, > Fredj, > > > [[alternat

Re: [R] Import data from Excel to R

2014-09-09 Thread Peter Alspach
Tena koe Fredj There are lots of ways, depending on your precise task and preference. Have you Googled 'Import data from Excel to R'? That will bring up lots of relevant hits, including the data import/export manual that ships with R. FWIW, I use RODBC and have written a simple wrapper to do

Re: [R] Import data from Excel to R

2014-09-09 Thread Gabor Grothendieck
On Tue, Sep 9, 2014 at 4:48 PM, JAWADI Fredj wrote: > Hi > I am a New user of R. > Please, how to import data from Excel to R? > Thanks, > Best regards, > Fredj, > There are some ways listed here: https://web.archive.org/web/20131109195709/http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_win

Re: [R] Why does debugging print() change output of function?

2014-09-09 Thread peter dalgaard
On 07 Sep 2014, at 00:31 , David Winsemius wrote: > The goal: > to create a function modeled after `subset` (notorious for its non-standard > evaluation) that will take a series of logical tests as unqiuoted expressions > to be evaluated in the framework of a dataframe environment and retur

Re: [R] Why does debugging print() change output of function?

2014-09-09 Thread David Winsemius
On Sep 9, 2014, at 4:07 PM, peter dalgaard wrote: On 07 Sep 2014, at 00:31 , David Winsemius wrote: The goal: to create a function modeled after `subset` (notorious for its non- standard evaluation) that will take a series of logical tests as unquoted expressions to be evaluated in th

[R] multi-threading

2014-09-09 Thread Yuan Luo
Hi, I am merging large data frames and it would be great if I can run merge in multi-threading/parallel mode. Can someone point me to the right way to do it? Best, Yuan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list h

Re: [R] multi-threading

2014-09-09 Thread Pascal Oettli
Hi Yuan, You can start reading the following site: http://cran.r-project.org/web/views/HighPerformanceComputing.html Regards, Pascal On Wed, Sep 10, 2014 at 2:56 PM, Yuan Luo wrote: > Hi, > I am merging large data frames and it would be great if I can run merge in > multi-threading/parallel mod

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread PO SU
Tks for all your help,  finally i choose the way in Rstudio ctrl+shift+C, and do twice to cancel those comments. It's enough for me now. BTW, I also like the way: if(FALSE) {}   :) -- PO SU mail: desolato...@163.com Majored in Statistics from SJTU At 2014-09-10 02:15:49, "Gjalt-Jorn Pe