[R] Evaluating a formula

2015-01-16 Thread philippe massicotte
Hi all. How we evaluate a formula in R? Ex.: params - list(a = 2, b = 3) x - seq(1,10, length.out = 100) func1 - as.formula(y ~ a*x^2 + b*x) ##How to evaluate func1 using x and the params list ??? Thank you in advance, Phil [[alternative

Re: [R] passing elements of named vector / named list to function

2015-01-16 Thread Rainer M Krug
Jeff Newmiller jdnew...@dcn.davis.ca.us writes: It x is a list... do.call(fun,x) Thanks - works perfectly. Only one further question: In my original usage, fun() is an S3 Generic Function and takes as the first argument an object which obviously *must not be* expanded, while the ... need to

[R] Extracting elements out of list in list in list

2015-01-16 Thread Rainer M Krug
Hi Consider the following variable: --8---cut here---start-8--- x1 - list( A = 11, B = 21, C = 31 ) x2 - list( A = 12, B = 22, C = 32 ) x3 - list( A = 13, B = 23, C = 33 ) x4 - list( A = 14, B = 24, C = 34 ) y1 - list( x1 = x1,

Re: [R] Latest version of Rtools is incompatible with latest version of R !!

2015-01-16 Thread PRAMEET LAHIRI
find_rtools() is a function of the 'devtools' package.  Maybe it's an issue with that package and not R, and I'm pretty sure Duncan Murdoch put great efforts in asserting Rtools is working well with R (that's been my experience for the last 5-10 years). I also know that devtools 1.7.0 have been

Re: [R] Latest version of Rtools is incompatible with latest version of R !!

2015-01-16 Thread Duncan Murdoch
On 16/01/2015 3:55 AM, PRAMEET LAHIRI wrote: find_rtools() is a function of the 'devtools' package. Maybe it's an issue with that package and not R, and I'm pretty sure Duncan Murdoch put great efforts in asserting Rtools is working well with R (that's been my experience for the last 5-10

Re: [R] Latest version of Rtools is incompatible with latest version of R !!

2015-01-16 Thread Hadley Wickham
Funnily, this problem disappears when I use RTools31.exe. And, I am not the only one facing this issue. A lot of people in my group (in which we all are learning R) are facing the same problem. I am really puzzled as to why RTools32.exe isn't compatible with R 3.1.2 !! Thanks again for

Re: [R] Evaluating a formula

2015-01-16 Thread Gabor Grothendieck
On Fri, Jan 16, 2015 at 3:16 AM, philippe massicotte pmassico...@hotmail.com wrote: Hi all. How we evaluate a formula in R? Ex.: params - list(a = 2, b = 3) x - seq(1,10, length.out = 100) func1 - as.formula(y ~ a*x^2 + b*x) ##How to evaluate func1 using x and the params list ???

[R] wave length dependent calibration

2015-01-16 Thread catalin roibu
Dear all, Is there a possibility to perform in R wave length dependent calibration analysis? I want to decompose a time series into high, low and band pass components using a n-years smoothing spline. Thank you very much! Best regards! -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry

[R] Problems with RcmdrPlugin.temis when Rcdr starts

2015-01-16 Thread Renato Medei
Hi to all, i'm using R 3.1.2 under Mac, OSX version 10.10.1 i'm trying to launch Rcmdr but i receive an Error and i'm not able to fix, could you help me? # Error screen library(Rcmdr) Carico il pacchetto richiesto: splines Carico il pacchetto richiesto: RcmdrMisc Carico il pacchetto richiesto:

Re: [R] How to get items for both LHS and RHS for only specific columns in arules?‏

2015-01-16 Thread Kim C.
Sorry, I see that the formatting of the e-mail went all wrong and was completely unreadable. you can find a readable version in the attachment and down below (if it will work this time). -- Hi all, I have a question about the arules

Re: [R] Problems with RcmdrPlugin.temis when Rcdr starts

2015-01-16 Thread John Fox
Dear Renato, There's not enough information here to diagnose the problem, but perhaps the following will help: First, I have no trouble loading the RcmdrPlugin.temis package, either directly via library(RcmdrPlugin.temis), in which case it brings up the Rcmdr interface, or indirectly via the

Re: [R] Extracting elements out of list in list in list

2015-01-16 Thread Chel Hee Lee
This approach may not be fancy as what you are looking for. xl - unlist(x) xl[grep(A, names(xl))] f1.x1.A f1.x2.A f2.x3.A f2.x4.A 11 12 13 14 I hope this helps. Chel Hee Lee On 01/16/2015 04:40 AM, Rainer M Krug wrote: Hi Consider the following variable:

Re: [R] Evaluating a formula

2015-01-16 Thread Chel Hee Lee
You may use 'eval()' with 'parse()' if you wish to use 'formula()' as below: a - params[[1]] b - params[[2]] eval(parse(text=func1)) [1] 5.00 5.652893 6.338843 7.057851 7.809917 8.595041 [7] 9.413223 10.264463 11.148760 12.066116 13.016529 14.00 [13] 15.016529

Re: [R] Extracting elements out of list in list in list

2015-01-16 Thread Bert Gunter
Chee Hee's approach is both simpler and almost surely more efficient, but I wanted to show another that walks the tree (i.e. the list) directly using recursion at the R level to pull out the desired components. This is in keeping with R's functional programming paradigm and avoids the use of

[R] Knn Probability Attributes:

2015-01-16 Thread Greg
Dear R Geniuses: I'm a C++ and Perl, not an R System consultant, but a client wants me to see if R can help him predict whether daily sales for some auto parts stores will be less than, greater, or equal to the median daily sales value. (equal to is defined as within 2%, otherwise there would

[R] Specifying strip names in xyplot (strip.custom)

2015-01-16 Thread Ahmed Attia
Hi R Users, I would like to specify strip names in xyplot. I have 5 sources (S) and 3 locations (Loc). How I can force R to specifiy the strip names for each source and location. Below is my code; S*Loc represents source by location. I do not know how to specify which panel or factors.levels.

Re: [R] Extracting elements out of list in list in list

2015-01-16 Thread Brian Diggs
On 1/16/15 9:34 AM, Bert Gunter wrote: Chee Hee's approach is both simpler and almost surely more efficient, but I wanted to show another that walks the tree (i.e. the list) directly using recursion at the R level to pull out the desired components. This is in keeping with R's functional

[R] DeepNet package - how to add hidden layers?

2015-01-16 Thread davide.chi...@gmail.com
Hi I just started to study the deepnet package: http://cran.r-project.org/web/packages/deepnet/index.html It is about deep leaning, so about the usage of multi-layer neural networks. I've started to use the train() functions available in the package, but I really cannot understand how to add more

[R] labelCoubtries() doesn't work. Where is my mistake?

2015-01-16 Thread paladini
Hello, I have problems to label countries in my map. I use the following code to draw the map: epimap=joinCountryData2Map(epidata,joinCode=NAME,nameCountryColumn=Country,nameJoinColumn=Country) mapCountryData(epimap, nameColumnToPlot=EPI.2.0 ,mapRegion=europe, oceanCol=slateblue1,

[R] Help - plot function in Windows

2015-01-16 Thread Nafiseh Mehdipour
Hi, I am writing regarding to my problem about using plot function. I am using R x64 3.1.1 (installed on Windows 7 SP1 (laptop Sony VGN-SR) ), and when I use type this code: x - c(-30,30) y - c(-5,5) plot.window(x , y) or any other form of plot function, it doesn't show anything. I used

[R] Saving Rdataframe into a SQL Server Schema and updating the resulting table

2015-01-16 Thread Vijay Chowdhari
Hi all Can someone assist me in creating a table in SQL Server using a Rdataframe as well as updating it with new records Here's my sample script in R. library(RODBC) #Connecting to Datum myconn -odbcConnect(Datum, uid=bihy, pwd=tarta) ### Server name is Datum Now I would like to save my

[R] Help - plot function in Windows

2015-01-16 Thread Nafise Mehdipour
​Hi, I am writing regarding to my problem about using plot function. I am using R x64 3.1.1 (installed on Windows 7 SP1 (laptop Sony VGN-SR) ), and when I use type this code: x - c(-30,30) y - c(-5,5) plot.window(x , y) or any other form of plot function, it doesn't show anything. I used

Re: [R] Help - plot function in Windows

2015-01-16 Thread Richard M. Heiberger
plot.window() is an internal support function, not a user function. use plot() x - c(-30,30) y - c(-5,5) plot(x , y) On Fri, Jan 16, 2015 at 4:18 PM, Nafise Mehdipour nfs.mehdip...@gmail.com wrote: Hi, I am writing regarding to my problem about using plot function. I am using R x64 3.1.1

Re: [R] Help - plot function in Windows

2015-01-16 Thread Duncan Murdoch
On 16/01/2015 1:18 PM, Nafiseh Mehdipour wrote: Hi, I am writing regarding to my problem about using plot function. I am using R x64 3.1.1 (installed on Windows 7 SP1 (laptop Sony VGN-SR) ), and when I use type this code: x - c(-30,30) y - c(-5,5) plot.window(x , y) or any other

[R] character type and memory usage

2015-01-16 Thread Mike Miller
First, a very easy question: What is the difference between using what=character and what=character() in scan()? What is the reason for the character() syntax? I am working with some character vectors that are up to about 27.5 million elements long. The elements are always unique.