Re: [R] vectorized sub, gsub, grep, etc.

2015-08-02 Thread John Thaden
Adam, The original posting gave a function sub2 whose aim differs both from your functions' aim and from the intent of mgsub() in the qdap package: > Here is code to apply a different > pattern and replacement for every target.#Example X <- c("ab", "cd", "ef") patt <- c("b", "cd", "a"

Re: [R] Splitting lines in R script

2015-08-02 Thread Peter Langfelder
R does not need a semicolon or other character to terminate a command; if a line can be interpreted as a complete command, it will (first line in your second example). Also note that the first example may not produce what you want (if your second example is any indication) - the result of pbivnorm

[R] Splitting lines in R script

2015-08-02 Thread Steven Yen
I have a line containing summation of four components. # This works OK: p<-pbivnorm(bb,dd,tau)+pbivnorm(aa,cc,tau)- -pbivnorm(aa,dd,tau)-pbivnorm(bb,cc,tau) # This produces unpredicted results without warning: p<-pbivnorm(bb,dd,tau)+pbivnorm(aa,cc,tau) -pbivnorm(aa,dd,tau)-pbivnorm(bb

Re: [R] NATURAL Smoothing B-splines

2015-08-02 Thread Spencer Graves
> library(sos) > ns. <- findFn('natural spline') found 191 matches; retrieving 10 pages 2 3 4 5 6 7 8 9 10 Downloaded 113 links in 70 packages. > ns2 <- findFn('natural splines') found 145 matches; retrieving 8 pages 2 3 4 5 6 7 8 Downloaded 70 links in 42 packages. > ns2. <- ns.|ns2 > ns2. # T

Re: [R] PythonInR. Python script in R with parameters required. Download satellite images from NASA

2015-08-02 Thread Florian Schwendinger
I believe the Problem is that you trying to give command line arguments pyExecfile("myPythonScript.py") and pyExecfile only expects to get a filename. In Pyhton27 pyExecfile only runs the Python command execfile on the given filename. So the Problem is that in pyExecfile("C:/Landsat/downloa

[R] NATURAL Smoothing B-splines

2015-08-02 Thread Marc Lamblin
Hi all, I'm an engineering student from Politecnico di Milano. I want to perform Smoothing using Smoothing B-splines on syntethic data. The splines must be NATURAL (at the edges the second and third order derivates are zero). How can I impose this constraint? I have searched in R documentation. Fo

Re: [R] Error when compiling R-2.5.1 / *** [d-p-q-r-tests.Rout] Fehler 1

2015-08-02 Thread Joerg Kirschner
Dear Martin, thanks for the advice, I'll check out Bioconductor. Meanwhile I reinstalled Ubuntu, this time as 64-bit and the error is gone : ) Rgds, Joerg On Sat, Aug 1, 2015 at 8:16 PM, Martin Morgan wrote: > On 07/31/2015 10:48 PM, Joerg Kirschner wrote: > >> Hi everyone, >> I am new to Linu