Re: [R] Using a text file as a removeWord dictionary in tm_map

2015-03-01 Thread Sun Shine
Thanks Jim. I thought that I was passing a vector, not realising I had converted this to a list object. I haven't come across the scan() function so far, so this is good to know. Good explanation - I'll give this a go when I can get back to that piece of work later today. Thanks again. Re

[R] How to convert a C vector to an SEXP for using it in R_orderVector()?

2015-03-01 Thread Marius Hofert
Hi, Inside a C function (foo()), I need to call R's order(). Writing R Extensions (2014, Section 6.10) gave me the hint to use R_orderVector() for this task. The third argument of this function needs an SEXP containing (in my case) the vector x (of which I would like to determine order()). My que

Re: [R] Using a text file as a removeWord dictionary in tm_map

2015-03-01 Thread jim holtman
The 'read.table' was creating a data.frame (not a vector) and applying 'c' to it converted it to a list. You should alway look at the object you are creating. You probably want to use 'scan'. == > testFile <- "Although,this,query,applies,specifically,to,the,tm,package" > # re

Re: [R] R and Python

2015-03-01 Thread Wensui Liu
depending on what you want. if you'd like to run r within python, there are 2 solutions as far as i've known, either by rpys or by pyper. here is a brief comparison i did before https://statcompute.wordpress.com/2012/12/10/a-brief-comparison-between-rpy2-and-pyper/ On Sun, Mar 1, 2015 at 8:41 AM,

Re: [R] R and Python

2015-03-01 Thread Collin Lynch
I recommend rpy2. http://rpy.sourceforge.net/rpy2.html It provides direct access to a running R instance with full support for R functions including package loading. It has some minor issues with graphics drivers making it best for programmatic and not interactive use but it is excellent for mun

Re: [R] RWebdriver and RSelenium returns the same error while trying to connect the java server

2015-03-01 Thread Ista Zahn
Do you have a server running? Can you connect to localhost directly from a browser? Best, Ista On Sun, Mar 1, 2015 at 12:35 PM, PO SU wrote: > > > Dear expeRts, >when i using RWebdriver and RSelenium , > > > >> require(RSelenium) > Loading required package: RSelenium >> remDr <- remoteDriver

Re: [R] R CMD wants (unnecessary) packages ?

2015-03-01 Thread Sarah Goslee
I would be very careful about removing the packages that are installed by default with R, http://cran.r-project.org/doc/FAQ/R-FAQ.html#Which-add_002don-packages-exist-for-R_003f either the base packages listed in that FAQ or the recommended ones in the list right below it. Removing those package

Re: [R] R CMD wants (unnecessary) packages ?

2015-03-01 Thread Bert Gunter
1. In future, for Mac issues you are more likely to get a helpful reply on the R-sig-mac list. 2. This is a warning only, not an error. You seem to indicate MASS was uninstalled (???), so I would guess that it wasn't there when it looked for it -- ergo the warning. My question: why uninstall these

Re: [R] (no subject)

2015-03-01 Thread Bert Gunter
1. Do not multiple post -- it's rude. 2. Use plain text emails, not HTML (although it makes no difference here). 3. Homework? -- This list has a no homework policy. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowled

Re: [R] figure resolution

2015-03-01 Thread S Ellison
See ?tiff, ?png etc and look for 'res' S Ellison From: R-help [r-help-boun...@r-project.org] On Behalf Of linda.s [samrobertsm...@gmail.com] Sent: 01 March 2015 14:50 To: r-help Subject: [R] figure resolution when using R for exporting figures to folder,

[R] (no subject)

2015-03-01 Thread Javad Zendedel
How can i plot the "scaled TTT-transform" with R? And how can i plot " Empirical Hazard function plot" ? Thank you in advance -- yours sincerely J.Zendedel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSU

[R] RWebdriver and RSelenium returns the same error while trying to connect the java server

2015-03-01 Thread PO SU
Dear expeRts,    when i using RWebdriver and RSelenium ,  > require(RSelenium) Loading required package: RSelenium > remDr <- remoteDriver(remoteServerAddr = "localhost"  +                       , port = +                       , browserName = "firefox" + ) > remDr$open() [1] "Connecting

[R] R help

2015-03-01 Thread javad . zendedel
​How can i plot the "scaled TTT-transform" with R? And how can i plot " Empirical Hazard function plot" ? Thank you in advance [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://sta

[R] R CMD wants (unnecessary) packages ?

2015-03-01 Thread Christian Hoffmann
When executing R CMD check etc. on a package, 00install.out tells me Warning in file.copy(file.path(.Library, pkg, "DESCRIPTION"), pd) : problem copying /Library/Frameworks/R.framework/Resources/library/MASS/DESCRIPTION to /var/ although I do not use MASS ( and all the other recently u

Re: [R] Firefox not showing R help.

2015-03-01 Thread Duncan Murdoch
On 01/03/2015 10:13 AM, Ista Zahn wrote: > I think this might be due to the removal of the -remote option in > firefox. Some discussion and details are available at > https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/msg00946.html Yes, that's it. R uses -remote if isLocal is TRUE; I had th

Re: [R] R and Python

2015-03-01 Thread Sarah Goslee
You mean like rPython? Or rpy? Or rpy2? Googling R Python is a great place to start. Sarah On Sun, Mar 1, 2015 at 9:41 AM, linda.s wrote: > Is there any good example codes of integrating R and Python? > Thanks. > Linda > -- Sarah Goslee http://www.functionaldiversity.org _

Re: [R] Firefox not showing R help.

2015-03-01 Thread Ista Zahn
I think this might be due to the removal of the -remote option in firefox. Some discussion and details are available at https://lists.gnu.org/archive/html/emacs-orgmode/2015-02/msg00946.html Best, Ista On Sun, Mar 1, 2015 at 7:14 AM, Duncan Murdoch wrote: > On 28/02/2015 6:43 PM, Rolf Turner wro

Re: [R] figure resolution

2015-03-01 Thread Jeff Newmiller
Read documentation? There is even documentation for how to ask questions about R [1] [2], since questions like this one fail to explain what you are actually doing. Asking a clear question allows someone to offer answers specific enough to your problem to seem more helpful than the above above.

[R] figure resolution

2015-03-01 Thread linda.s
when using R for exporting figures to folder, how to improve the figure resolution? Thanks. Linda [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-h

[R] R and Python

2015-03-01 Thread linda.s
Is there any good example codes of integrating R and Python? Thanks. Linda [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Why does R replace all row values with NAs

2015-03-01 Thread peter dalgaard
> On 27 Feb 2015, at 16:02 , Duncan Murdoch wrote: > > Yes. Indexing with a logical NA is probably a mistake, and this is one > way to signal it without actually triggering a warning or error. There are cases where it isn't (usually) a mistake, e.g. pch=c(25,24)[sex], where it is quite crucia

Re: [R] Firefox not showing R help.

2015-03-01 Thread Duncan Murdoch
On 28/02/2015 6:43 PM, Rolf Turner wrote: > > See inline below. > > On 01/03/15 10:59, Duncan Murdoch wrote: >> On 28/02/2015 4:10 PM, Rolf Turner wrote: >>> >>> Firefox recently updated itself on my laptop. Now when I ask for R help >>> --- e.g. ?plot --- I just get my home page. And no help. I

Re: [R] Folder size

2015-03-01 Thread Luca Cerone
of course you can substitute "." with a path to your folder.. and you might want to set fullnames = TRUE and maybe include.dirs = TRUE in list.files On Sun, Mar 1, 2015 at 12:59 PM, Luca Cerone wrote: > Hi Christopher, > > sum(file.info(list.files(".", all.files = TRUE, recursive = TRUE))$size) >

Re: [R] Folder size

2015-03-01 Thread Luca Cerone
Hi Christopher, sum(file.info(list.files(".", all.files = TRUE, recursive = TRUE))$size) should do the trick. Cheers, Luca On Sun, Mar 1, 2015 at 12:33 PM, Christofer Bogaso wrote: > Hi again, > > I am wondering if there is any way to extract the Folder size. For > example, I want to get infor

[R] Folder size

2015-03-01 Thread Christofer Bogaso
Hi again, I am wondering if there is any way to extract the Folder size. For example, I want to get information of size for all folders in my C: drive. It seems that the function file.info() only work for File, not on Folder. Appreciate any pointer. Thanks and regards,

Re: [R] Lubridate and NameSpace

2015-03-01 Thread peter dalgaard
> On 01 Mar 2015, at 00:32 , Roy Mendelssohn - NOAA Federal > wrote: > >> lubridate::%m+% Actually trying it would have revealed > lubridate::%m+% Error: unexpected SPECIAL in "lubridate::%m+%" Notice that this is a syntactical problem, not a semantic one; you cannot juxtapose two operators

Re: [R] Substring replacement in string

2015-03-01 Thread Hervé Pagès
Hi Alrik, On 02/28/2015 11:06 PM, Alrik Thiem wrote: Dear Hervé, Many thanks for your suggestion. Gabor Grothendieck proposed a simple one-liner that works perfectly for my purposes: gsub("(\\b[a-oq-z][a-z0-9]*)", "1-\\U\\1", x, perl = TRUE) where x is the respective string. Sounds good. I