[R] optim, L-BFGS-B | constrained bounds on parms?

2014-09-19 Thread Evan Cooch
Or, something to that effect. Following is an example of what I'm working with basic ABO blood type ML estimation from observed type (phenotypic) frequencies. First, I generate a log-likelihood function. mu[1] - mu[2] are allele freqs for A and B alleles, respectively. Since freq of O allele

Re: [R] Failure with .Rprofile on Mac OS X

2014-09-19 Thread Amos B. Elberg
David - the startup directory for Terminal.app shouldn't affect where R looks for .Rprofile. If R is started from the command line, it should look in whatever is the user's current directory (which will be ~/ if Terminal was just launched), and then ~/ . It shouldn't be looking in

Re: [R] Pseudo R squared for quantile regression with replicates

2014-09-19 Thread Donia Smaali Bouhlila
Thank you for considering my email and replying. Well, I am working with TIMSS 2007 survey data ( Trends in international mathematics and science study). TIMSS is a stratified DATA, where the primary sampling unit is the school I want to test the effect of some independent variables

Re: [R] RGtk2 drawing area as cairo device - no points

2014-09-19 Thread François Rebaudo
Thanks ! Just in case it could be of any help, this is what I have done for MS Windows users : library(RGtk2) library(cairoDevice) win = gtkWindow(show = FALSE) win$setDefaultSize(500, 500) hbox-gtkHBoxNew(homogeneous=FALSE, spacing=0) if (Sys.info()[1]==Windows){ png(filename=temp.png,

Re: [R] Pseudo R squared for quantile regression with replicates

2014-09-19 Thread Donia Smaali Bouhlila
Thank you for considering my email and replying. Well, I am working with TIMSS 2007 survey data ( Trends in international mathematics and science study). TIMSS is a stratified DATA, where the primary sampling unit is the school I want to test the effect of some independent variables

Re: [R] beta package for 3D PDF output

2014-09-19 Thread Michail Vidiassov
Dear All, my 3D PDF output package has got incompatible with recent rgl versions. If someone needs a working version of rgl with 3D PDF export (sources and Windows binaries) - send me a request. Sincerely, Michail __ R-help@r-project.org mailing

Re: [R] Using R in our commercial business application

2014-09-19 Thread Pasu
Hi Thanks to all for the inputs. It will also be great to get inputs on the procedure and the contact person for getting the commercial license on R Rgds Pasu On 19-Sep-2014 2:13 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 18/09/2014 2:35 PM, Marc Schwartz wrote: On Sep 18, 2014,

Re: [R] Using R in our commercial business application

2014-09-19 Thread peter dalgaard
There is no such person, because we don't do commercial licensing. This is pretty much impossible because the R developers do not own every piece of software that is used inside R. There are however companies that sell commercial support for R, and they will likely be able to help you about

[R] See the numeric codes of a factor

2014-09-19 Thread Angel Rodriguez
Dear Subscribers, I want to label a numeric variable 0=Bad /1=Good. I understand the only way is to transform it into a factor variable. Is there a way to check that the numeric values of the new factor variable are 0 and 1 and not 1 and 2? Thank you very much. Angel Rodriguez-Laso

Re: [R] Control color palette and legend in filled.contour

2014-09-19 Thread Karline Soetaert
Thiago, This will not be simple using filled.contour, as this changes the layout from the figure. You might try the function image2D from plot3D: require(plot3D) par(mfrow = c(2, 1)) par(mar = c(0, 4, 4, 2)) plot(0, axes = FALSE, frame.plot = TRUE) # upper plot par(mar = c(4, 4, 0, 2)) Col -

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Jim Lemon
On Fri, 19 Sep 2014 12:53:16 PM Angel Rodriguez wrote: Dear Subscribers, I want to label a numeric variable 0=Bad /1=Good. I understand the only way is to transform it into a factor variable. Is there a way to check that the numeric values of the new factor variable are 0 and 1 and not

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Duncan Murdoch
On 19/09/2014, 6:53 AM, Angel Rodriguez wrote: Dear Subscribers, I want to label a numeric variable 0=Bad /1=Good. I understand the only way is to transform it into a factor variable. Is there a way to check that the numeric values of the new factor variable are 0 and 1 and not 1 and

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Angel Rodriguez
Thank you, Duncan. So isn't it possible to add labels to a variable with numeric values 0/1? This kind of variable is very useful for logistic regression, for example, but I'd rather have its categories labelled. Angel De: Duncan Murdoch

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Duncan Murdoch
On 19/09/2014 8:12 AM, Angel Rodriguez wrote: Re: [R] See the numeric codes of a factor Thank you, Duncan. So isn't it possible to add labels to a variable with numeric values 0/1? This kind of variable is very useful for logistic regression, for example, but I'd rather have its categories

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Angel Rodriguez
Well, a variable with values 0/1 is useful for calculating observed probabilities by groups. But it is not diffcult to have the same variable both as numeric and as a factor in the dataframe and use each variation depending on the analysis. Angel De: Duncan

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Jeff Newmiller
Sounds like a factor to me. You are just inappropriately focused on the underlying representation. Once you start using factors in regression you will get it. --- Jeff NewmillerThe .

Re: [R] See the numeric codes of a factor

2014-09-19 Thread Bert Gunter
Talk to a local statistician or study a book on regression. You do not understand how regression works. In R, see ?contrasts . -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom.

[R] package Parallel - accessing remote cores on Windows using plink (PuTTY)

2014-09-19 Thread Tevlin, Dylan
Hello all. My system information: R 2.14.1 x64 Windows 7 I'm attempting to access cores on other machines in my LAN. As setup, I can ping all the machines successfully and it's a private office network where I have access to all computers, so there really shouldn't be any problems arising

[R] Extract model from deriv3 or nls

2014-09-19 Thread Prof J C Nash (U30A)
If it is possible, I think you will need to get the expression for Puro.fun2 and then (essentially manually) put it into nls (or perhaps better nlmrt or minpack.lm which have better numerics and allow bounds; nlmrt even has masks or temporarily fixed parameters, but I need to writa a vignette

[R] optim, L-BFGS-B | constrained bounds on parms?

2014-09-19 Thread Prof J C Nash (U30A)
One choice is to add a penalty to the objective to enforce the constraint(s) along with bounds to keep the parameters from going wild. This generally works reasonably well. Sometimes it helps to run just a few iterations with a big penalty scale to force the parameters into a feasible region,

Re: [R] package Parallel - accessing remote cores on Windows using plink (PuTTY)

2014-09-19 Thread Jeff Newmiller
While I hope someone with first hand experience or time to try it out pipes up, I noticed something wrong in your description. The ssh command is executed on the local machine, not the remote machine. That command must succeed on the local machine in order to start Rscript on the remote

Re: [R] package Parallel - accessing remote cores on Windows using plink (PuTTY)

2014-09-19 Thread Tevlin, Dylan
Thanks for your input Jeff, yes that was a misunderstanding on my part about where the system command was actually run, and I think you're right on point, that path to Rscript doesn't make any sense! Big oversight by me. Nicely enough, there is a parameter for specifying the path to Rscript,

Re: [R] read.table() 1Gb text dataframe

2014-09-19 Thread Greg Snow
When working with datasets too large to fit in memory it is usually best to use an actual database, read the data into the database, then pull the records that you want into R. There are several packages for working with databases, but 2 of the simplest are the RSQLite and sqldf packages

Re: [R] package Parallel - accessing remote cores on Windows using plink (PuTTY)

2014-09-19 Thread Tevlin, Dylan
After specifying the path to Rscript we're still hanging. As for Jeff's comment on how the remote machine is receiving the ssh request, I don't know. My assumption is that, given the ssh request going through, it's attempting to make the command Rscript.exe parallel:::.slaveRSOCK(), which

Re: [R] Failure with .Rprofile on Mac OS X

2014-09-19 Thread Gang Chen
Thanks for the help, Amos! The only reason that *should* happen is if there's an .Rprofile in the directory you're in when you start R. There is only one .Rprofil, which is in my home directory ~/ Where *exactly* is the .Rprofile file you want loaded The only one is in my home directory.

Re: [R] Failure with .Rprofile on Mac OS X

2014-09-19 Thread David Winsemius
Good point. I see the behavior you describe. Sent from my iPhone On Sep 19, 2014, at 1:18 AM, Amos B. Elberg amos.elb...@gmail.com wrote: David - the startup directory for Terminal.app shouldn't affect where R looks for .Rprofile. If R is started from the command line, it should look in

[R] [R-pkgs] CRAN submission of Hmisc 3.14-5

2014-09-19 Thread Frank Harrell
An update to the Hmisc package is now on CRAN. Some recent changes: * latex.summaryM: fixed bug in caption with test=TRUE. Thanks: Yonghao Pua * combined.levels: sensed all NA vector, now return non-factor numeric instead * dataframeReduce: handle all-NA factor variable *

[R] [R-pkgs] CRAN update: rms 4.2-1

2014-09-19 Thread Frank Harrell
An update to the rms package is now on CRAN. Some recent changes: * plot.summary.rms: allowed a vector for lwd, and passed lwd to confbar. Thanks: Michael Friendly * gendata: Starting in R 3.1.0, as.data.frame.labelled or as.data.frame.list quit working when length vary; workaround

Re: [R] read.table() 1Gb text dataframe

2014-09-19 Thread Stephen HK Wong
Thanks Henrick. Seems it fits my needs. One my question is the argument, length.out=0.10*n, is it randomly taking out 10% ? I found it basically takes every 10th row if I put length.out=0.1*n, and every 100th row if I put length.out=0.01*n till the end. I couldn't find this information on

[R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Arnaud Michel
Hello I have the two dataframes Df1 and Df2 which have the common variable AgeSexeCadNCad I would like to add the new variable Df2$Pourcent which correspond at the value of Df1$AgeSexeCadNCad. Thank you for your help. Michel Df1 - structure(list(AgeSexeCadNCad = structure(1:36, .Label =

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Sarah Goslee
Is merge() what you're looking for? On Fri, Sep 19, 2014 at 1:15 PM, Arnaud Michel michel.arn...@cirad.fr wrote: Hello I have the two dataframes Df1 and Df2 which have the common variable AgeSexeCadNCad I would like to add the new variable Df2$Pourcent which correspond at the value of

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Rui Barradas
Hello, Try ?merge: Df3 - merge(Df2, Df1, by = AgeSexeCadNCad) Hope this helps, Rui Barradas Em 19-09-2014 18:15, Arnaud Michel escreveu: Hello I have the two dataframes Df1 and Df2 which have the common variable AgeSexeCadNCad I would like to add the new variable Df2$Pourcent which

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Marc Schwartz
On Sep 19, 2014, at 12:15 PM, Arnaud Michel michel.arn...@cirad.fr wrote: Hello I have the two dataframes Df1 and Df2 which have the common variable AgeSexeCadNCad I would like to add the new variable Df2$Pourcent which correspond at the value of Df1$AgeSexeCadNCad. Thank you for your

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Rui Barradas
You might also want to try argument all.x: Df3 - merge(Df2, Df1, by = AgeSexeCadNCad, all.x = TRUE) This is because there are 2 rows in Df2 without a corresponding 'AgeSexeCadNCad' in Df1. Rui Barradas Em 19-09-2014 18:39, Rui Barradas escreveu: Hello, Try ?merge: Df3 - merge(Df2, Df1,

Re: [R] R/Ubuntu, “package ‘stats’ in options(”defaultPackages“) was not found”

2014-09-19 Thread jwd
On Thu, 18 Sep 2014 10:28:42 -0400 davide.chi...@gmail.com davide.chi...@gmail.com wrote: I tried with a different mirror, but nothing changed... Any other idea? Thanks anyway -- Davide What is the output of library()? JWDougherty __

Re: [R] Failure with .Rprofile on Mac OS X

2014-09-19 Thread Berend Hasselman
On 18-09-2014, at 17:18, Gang Chen gangch...@gmail.com wrote: When R starts in GUI (e.g.,/Library/Frameworks/R.framework/Resources/bin/R) on my Mac OS X 10.7.5, the startup configuration in .Rprofile works fine. However, when R starts on the terminal (e.g.,

Re: [R] To Add a variable from Df1 to Df2 which have a same common variable

2014-09-19 Thread Arnaud Michel
Thank you to Marc Schwartz, Rui Barrada and Sarah Goslee Michel Le 19/09/2014 19:46, Marc Schwartz a écrit : On Sep 19, 2014, at 12:15 PM, Arnaud Michel michel.arn...@cirad.fr wrote: Hello I have the two dataframes Df1 and Df2 which have the common variable AgeSexeCadNCad I would like to add

[R] Error in rownames

2014-09-19 Thread Chris Jackson-Jordan
Dear fellow R users, I am trying to run the random forest and Yaimpute packages in R to impute a grid to project in a gis. However, after running the imputation I keep getting an error in the rownames. This sounds simple enough, but I cannot figure out what these rownames are reffering to. Any

[R] [R-pkgs] RMOA data stream modelling using MOA (Massive Online Analysis)

2014-09-19 Thread Jan Wijffels
Dear R community, For users interested in streaming classification or building classification models with limited amounts of RAM on your whole data set, I would like to announce the release of a new package called RMOA on CRAN ( http://cran.r-project.org/web/packages/RMOA). MOA is the most

[R] Propensity Score Matching with Restrictions (Matching package)

2014-09-19 Thread Bannert Matthias
Dear listers, I am using Jas Sekhon's Matching package to perform propensity score matching and like it a lot so far. Still though I wonder whether it is possible to impose restrictions on the Matching. I've seen the restriction parameter, but I doubt this is what I want (or I don't get how to

Re: [R] optim, L-BFGS-B | constrained bounds on parms?

2014-09-19 Thread Evan Cooch
On 9/19/2014 11:32 AM, Prof J C Nash (U30A) wrote: One choice is to add a penalty to the objective to enforce the constraint(s) along with bounds to keep the parameters from going wild. This generally works reasonably well. Sometimes it helps to run just a few iterations with a big penalty

[R] plot

2014-09-19 Thread IZHAK shabsogh
Hi, kindly give me some guide on how to plot the following data in a single line graph that is ( y1,y2,y3,y4 against x) including title and key y1-c(0.84,1.03,0.96) y2-c(1.30,1.46,1.48) y3-c(1.32,1.47,1.5) y4-c(0.07,0.07,0.07) x-c(500,1000,2000) Thanks Ishaq [[alternative HTML version

Re: [R] optim, L-BFGS-B | constrained bounds on parms?

2014-09-19 Thread Evan Cooch
You could also use Rvmmin that has bounds, or nmkb from dfoptim (though you cannot start on bounds). One 'negative' for dfoptim is that is doesn't automatically generate the Hessian (as far as I can tell). Rather nice to be able to do so for other calculations that usual follow after the

[R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Gaurav Chakravorty
I am trying to build R-3.1.0 on RHEL But configure returns with an error due to X11/Intrinsic.h missing Is there a workaround ? Gaurav Chakravorty Circulum Vite LLC | www.circulumvite.com 2500 PLAZA 5 . Harborside Financial Center, Jersey City, NJ 07311-4026 Tel: 201-377-2302 Fax:

Re: [R] plot

2014-09-19 Thread Marc Schwartz
On Sep 19, 2014, at 10:48 AM, IZHAK shabsogh ishaqb...@yahoo.com wrote: Hi, kindly give me some guide on how to plot the following data in a single line graph that is ( y1,y2,y3,y4 against x) including title and key y1-c(0.84,1.03,0.96) y2-c(1.30,1.46,1.48) y3-c(1.32,1.47,1.5)

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Marc Schwartz
On Sep 19, 2014, at 1:28 PM, Gaurav Chakravorty gc...@circulumvite.com wrote: I am trying to build R-3.1.0 on RHEL But configure returns with an error due to X11/Intrinsic.h missing Is there a workaround ? In most Linuxen, the header files are contained in *-dev[el] packages. For RHEL,

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Marc Schwartz
On Sep 19, 2014, at 1:28 PM, Gaurav Chakravorty gc...@circulumvite.com wrote: I am trying to build R-3.1.0 on RHEL But configure returns with an error due to X11/Intrinsic.h missing Is there a workaround ? In most Linuxen, the header files are contained in *-dev[el] packages. For RHEL,

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread Prof Brian Ripley
On 19/09/2014 19:28, Gaurav Chakravorty wrote: I am trying to build R-3.1.0 on RHEL But configure returns with an error due to X11/Intrinsic.h missing Is there a workaround ? Yes, install it! If you need more help, read the posting guide and note the appropriate list from

Re: [R] plot

2014-09-19 Thread Tom Wright
plot(x=range(x),y=range(c(y1,y2,y3.y4),type='n') lines(x=x,y=y1,lty=1) lines(x=x,y=y2,lty=2) lines(x=x,y=y3,lty=3) lines(x=x,y=y4,lty=4) legend('bottomright',c('Y1','Y2','Y3','Y4','Y5'),lty=1:4) or something like that. On Fri, 2014-09-19 at 14:11 -0500, Marc Schwartz wrote: On Sep 19, 2014,

Re: [R] X11/Intrinsic.h preventing build on rhel

2014-09-19 Thread John McKown
On Fri, Sep 19, 2014 at 1:28 PM, Gaurav Chakravorty gc...@circulumvite.com wrote: I am trying to build R-3.1.0 on RHEL But configure returns with an error due to X11/Intrinsic.h missing Is there a workaround ? yum install libXt-devel This from my Fedora 20 x86_64 installation. -- There is

[R] Using R in our commercial business application

2014-09-19 Thread Louis Bajuk-Yorgan
TERR (TIBCO Enterprise Runtime for R) is an independent implementation of an R-compatible engine (based on our long history and expertise with S+). One of the features of TERR is that it can be licensed for embedding and redistribution, since it is not subject to the GPL license. For more

Re: [R] Error in rownames

2014-09-19 Thread Adams, Jean
Chris, It's hard to troubleshoot without reproducible code. I suggest you post a simple example of code that we can run. For example, use dput(training[1:20, ]) to spit out the first 20 lines of the training data. Then simplify the rest of the code as much as possible. library(yaImpute)

[R] Combining two data frames

2014-09-19 Thread Adrian Johnson
Hi: Appreciate if I could get some help. I have two data frames. I want to combine these two dfs bases on first column. df1 : SubjectG1 G2G3 A 10 1 0 B 20 220 df2: Subject m1m2 m3 A 20 9 30 B

[R] Converting xy plot arguments into a point argument and fixed x-axis scaling

2014-09-19 Thread nebulo help
Dear all,     I have a data.frame xy which I am plotting like in the code below (provided is a small data sample with dummy data that should work).     Is there a way how I could convert my xx and yy in the xy plot to a points command so that I could set type='n' and add points afterwards in

[R] Issue labelling datapoints in xyplot with two Y-axis

2014-09-19 Thread mb3058
Hello R friends, I am trying to add label to each of my datapoints in an xyplot which has two Y-axis. When I run my code with only 1 xyplot it labels the datapoints just fine. However when I have two xyplots plotted together,I am unable to label the data points. Any suggestion will be

Re: [R] Combining two data frames

2014-09-19 Thread Uwe Ligges
See ?merge Best, Uwe Ligges On 19.09.2014 22:58, Adrian Johnson wrote: Hi: Appreciate if I could get some help. I have two data frames. I want to combine these two dfs bases on first column. df1 : SubjectG1 G2G3 A 10 1 0 B 20 2

Re: [R] Combining two data frames

2014-09-19 Thread Adrian Johnson
thanks it works I guess: merge(b1,b2,by='Subject') On Fri, Sep 19, 2014 at 5:03 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: See ?merge Best, Uwe Ligges On 19.09.2014 22:58, Adrian Johnson wrote: Hi: Appreciate if I could get some help. I have two data frames. I want to

[R] Help on tidy_source

2014-09-19 Thread Agony
Dear all, Good time. Could anybody can help me with my below code on Windows 7 and R 3.1.0 when I run this code: tidy_source ( ugly script.R, file = beautiful script.R ) I encounter this error message: Error in parse(text = x, keep.source = TRUE) : text:11:14: unexpected '==' 10: 11:

Re: [R] plot

2014-09-19 Thread Rolf Turner
Looks like homework to me. cheers, Rolf P. S. In any case, so some basic reading of introductory R material, available from the R web page. R. On 20/09/14 03:48, IZHAK shabsogh wrote: Hi, kindly give me some guide on how to plot the following data in a single line graph that is (