[R] nls model singular gradient matrix at initial parameter estimates

2015-05-26 Thread oussama belmejdoub
Greetings, I'm trying to use the nls function in my statistics project but I'm really finding lot of difficulties. I have a function called apinene_modele_prediction that calculates the estimations: library(expm); #exp of a matrixapinene_modele_prediction <- function(t,theta) { x0=c(100,0,0,0,0)

[R] X11 font problem

2015-05-26 Thread Renato Rivera
Hi I have this problem and do not know how to solve it, I'm new to R R version 2.15.0 (2012-03-30) Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) x11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 c

Re: [R] Problem with comparing multiple data sets

2015-05-26 Thread Mohammad Alimohammadi
Thank you John. Yes. as you mentioned this is not really what I am looking for. It's interesting because I was really thinking that it should be pretty easy. All I need to do is just compare class1, class2 and class3 for each text and put the most frequent number next to it in each row. Repeat it

[R] Retrieving data from nested lists

2015-05-26 Thread blue honour via R-help
Dear R users, I have a question regarding retrieving data from nested lists. To illustrate, here is an example input: d1<-data.table(v1=c(3,4),v2=c(2,5)) d2<-data.table(v1=c(1,2),v2=c(1,1))l1<-list(d1,name="test")l2<-list(d2,name="test2")motherlist<-list()motherlist$l1<-l1motherlist$l2<-l2 Let's s

[R] Problem merging data frames and duplicates

2015-05-26 Thread Frank Burbrink
Hello All, I am attempting to merge two data frames that naturally contain duplicate entries, however when using either merge or dMerge I get even more duplicates. For example: data.frame(state=c("IL", "IL", "LA","LA", "MS","MS", "AR", "AR"), locus=c(1,1,2,2,3,4,5,6))->x data.frame(state=c("IL"

Re: [R] Find and replace backslashes XXXX

2015-05-26 Thread Ista Zahn
Escape the backslash with another backslash, i.e., gsub("\\","/","X:\\Classes\\TT\\Automation", fixed = TRUE) best, Ista On Tue, May 26, 2015 at 9:30 PM, Dan Abner wrote: > Hi all, > > I realize that the backslash is an escape character in R, therefore, I > am trying to replace it with a forwar

[R] Find and replace backslashes XXXX

2015-05-26 Thread Dan Abner
Hi all, I realize that the backslash is an escape character in R, therefore, I am trying to replace it with a forward slash. Can someone please suggest how to get this code to work? > lib<-gsub("\","/","X:\Classes\TT\Automation") Error: unexpected symbol in "lib<-gsub("\","/","X" Thanks, Dan

Re: [R] [R-sig-ME] different results from lme and lmer function

2015-05-26 Thread John Sorkin
Ben, I doubt the very small difference in log likelihood gives much, if any information about which model is a better fit. Even if we overlook the limited precision of the estimate of the REML criterion, the difference is so small as to me of minimal importance. John > John David Sorkin M.D., Ph.D

Re: [R] lme function to obtain pvalue for fixed effect

2015-05-26 Thread Ben Bolker
li li gmail.com> writes: > > Hi all, > I am using the lme function to run a random coefficient model. > Please see > output (mod1) as below. Please don't cross-post to different R lists (this is explicitly deprecated by the list policy: , "cross-posting

Re: [R] [R-sig-ME] different results from lme and lmer function

2015-05-26 Thread Ben Bolker
These actually aren't terribly different from each other. I suspect that lmer is slightly closer to the correct answer, because lme reports a "log-likelihood" (really -1/2 times the REML criterion) of 49.30021, while lmer reports a REML criterion of -98.8 -> slightly better fit at -R/2 = 49.4.

[R] different results from lme and lmer function

2015-05-26 Thread li li
Hi all, I am fitting a random slope and random intercept model using R. I used both lme and lmer funciton for the same model. However I got different results as shown below (different variance component estimates and so on). I think that is really confusing. They should produce close results. Any

Re: [R] [R-sig-ME] lme function to obtain pvalue for fixed effect

2015-05-26 Thread Thierry Onkelinx
Because they test different hypothesis. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the exper

Re: [R] [R-sig-ME] lme function to obtain pvalue for fixed effect

2015-05-26 Thread li li
Thanks so much for replying. Yes LimerTest package could be used to get pvalues when using lmer function. But still the summary and anova function give different pvalues. Hanna 2015-05-26 15:19 GMT-04:00, byron vinueza : > You can use the lmerTest package . > > > > > > Enviado desde mi iPhone >

Re: [R] [R-sig-ME] lme function to obtain pvalue for fixed effect

2015-05-26 Thread byron vinueza
You can use the lmerTest package . Enviado desde mi iPhone > El 26/5/2015, a las 13:18, li li escribió: > > Hi all, > I am using the lme function to run a random coefficient model. Please see > output (mod1) as below. > I need to obtain the pvalue for the fixed effect. As you can see, > t

[R] lme function to obtain pvalue for fixed effect

2015-05-26 Thread li li
Hi all, I am using the lme function to run a random coefficient model. Please see output (mod1) as below. I need to obtain the pvalue for the fixed effect. As you can see, the pvalues given using the summary function is different from the resutls given in anova function. Why should they be diff

Re: [R] Installing "Blotter"and "Rtools"in R

2015-05-26 Thread David Winsemius
On May 26, 2015, at 6:29 AM, nmrql wrote: > HI, Im trying to install the "blotter" package in R however I get the > following message: How? > > Warning in install.packages : > package ‘blotter’ is not available (for R version 3.2.0) I do not see it in the list of packages available from CRAN

Re: [R] How to pass a variable to a function which use variable name as a parameter

2015-05-26 Thread David Winsemius
On May 26, 2015, at 8:30 AM, William Dunlap wrote: > One way to use variable names in functions like Predict() that > do not evaluate their arguments in the standard way is to use > do.call() along with as.name(). E.g., > varName<-"age" > do.call("Predict", list(fit, as.name(varName), np=4))})

Re: [R] png package in Ubuntu 12.04 with R 3.1.0

2015-05-26 Thread Yihui Xie
sudo apt-get install libpng12-dev I'm not sure about Ubuntu 12.04. You may need a different libpng??-dev. Regards, Yihui -- Yihui Xie Web: http://yihui.name On Tue, May 26, 2015 at 2:10 AM, Gygli, Gudrun wrote: > > Dear All, > > > I am using R to analyse computer simulations of ligand docking

Re: [R] How to pass a variable to a function which use variable name as a parameter

2015-05-26 Thread William Dunlap
One way to use variable names in functions like Predict() that do not evaluate their arguments in the standard way is to use do.call() along with as.name(). E.g., varName<-"age" do.call("Predict", list(fit, as.name(varName), np=4))}) gives the same result as Predict(fit, age, np=4) Bill D

[R] Installing "Blotter"and "Rtools"in R

2015-05-26 Thread nmrql
HI, Im trying to install the "blotter" package in R however I get the following message: Warning in install.packages : package ‘blotter’ is not available (for R version 3.2.0) I have been told to first install the "Rtools" package, which gives me the same message. I also believe that there is

Re: [R] Path analysis

2015-05-26 Thread John Fox
Dear Alberto, There are several R packages available on CRAN for structural equation modeling: sem, lavaan, and OpenMx come immediately to mind. If your model is recursive with only observed variables, then you could just use lm(). If your model is nonrecursive with only observed variables, the

Re: [R] png package in Ubuntu 12.04 with R 3.1.0

2015-05-26 Thread John Kane
Have you loaded the png package? library(png) John Kane Kingston ON Canada > -Original Message- > From: gudrun.gy...@wur.nl > Sent: Tue, 26 May 2015 07:10:35 + > To: r-help@r-project.org > Subject: [R] png package in Ubuntu 12.04 with R 3.1.0 > > > Dear All, > > > I am using R t

Re: [R] apply a function to a list of data frames

2015-05-26 Thread Stefano Sofia
Thank you for your help. Your explanations have been very useful. Stefano Da: Rui Barradas [ruipbarra...@sapo.pt] Inviato: venerdì 22 maggio 2015 20.26 A: Stefano Sofia; r-help@r-project.org Oggetto: Re: [R] apply a function to a list of data frames Hello

Re: [R] (no subject)

2015-05-26 Thread Jim Lemon
Hi venkadesan, Assuming that the Name column is now a factor (and the data set is a data frame named "mydata"), try: mydata$Name<-as.character(mydata$Name) If you mean that you want to display column A with percentage signs: paste(mydata$A,"%",sep="") You can use the "format" function to displa

Re: [R] How to pass a variable to a function which use variable name as a parameter

2015-05-26 Thread John McKown
On Tue, May 26, 2015 at 5:14 AM, wong jane wrote: > There are functions which use variable names as parameters in some R > packages. However, if the variable name is stored in another variable, how > can I pass this variable to the function. Taking the "rms" package as an > example: > > ​​ > libr

[R] (no subject)

2015-05-26 Thread venkadesan venky
Hello guys, I have data set like this Name A B CD Venky 12 157 168 209 Kalai65 8899 889 998 balaji98 877 8787 9888 . . . i want to change Name column as a Charcter and A column as a percentage and B and C column as a

[R] Hadoop R integration

2015-05-26 Thread Lalitha Kristipati
Hi, I need to showcase how R and Hadoop can work together using ORCH. I have found a sample code from the ORACLE website as follows dfs <- hdfs.attach("ontime_DB") res <- hadoop.run( dfs, mapper = function(key, value) { if (key == 'SFO' & !is.na(x$ARRDELAY)) {

[R] logistic regression R and Stata – grouping variable

2015-05-26 Thread Lambert Bruno
Hello, I mostly use Stata 13 for my regression analysis. I want to conduct a logistic regression on a proportion/number of success. Because I receive errors in Stata I did not expect nor understand (if there are Stata experts who want to know more about the problems I face and can potentially h

[R] png package in Ubuntu 12.04 with R 3.1.0

2015-05-26 Thread Gygli, Gudrun
Dear All, I am using R to analyse computer simulations of ligand docking in a protein. I am plotting the results as scatterplots and bopxplots, using the code below. This works perfectly fine. I would like now to add a png file to that plot, meaning I want sth like: png(file="analysis.png"

Re: [R] Help with urnsamples and all possible combination

2015-05-26 Thread MGalla
Thanks for your help. So I have to try it on the long way, because I need exactly all combinations, but thanks for the idea. Best wishes Michelle Galla -- View this message in context: http://r.789695.n4.nabble.com/Help-with-urnsamples-and-all-possible-combination-tp4707560p4707676.html Sent f

Re: [R] Path analysis

2015-05-26 Thread Charles Determan
Given that your problem primarily focuses on a biological context you probably would have better luck with bioconductor (www.bioconductor.org). Regards, Charles On Tue, May 26, 2015 at 12:43 AM, Alberto Canarini < alberto.canar...@sydney.edu.au> wrote: > Hi there, > > As I'm approaching path ana

Re: [R] Issues with loading csv file

2015-05-26 Thread Shivi82
Hi Pat, Thanks for the suggestion. It worked for me. Actually I had not saved the file in the WD accidentally and with the help of get files syntax I got to know what was the issue. Thanks a ton. Shivi -- View this message in context: http://r.789695.n4.nabble.com/Issues-with-loading-csv-fil

Re: [R] R CMD methods and ggplot2 advice

2015-05-26 Thread Duncan Murdoch
This posting should probably go to the new R-package-devel mailing list instead of R-help. If you do re-post there, you should give more information to let people help you. We can see the errors, but we can't see the source to your package, so it's hard to diagnose them. If your source is online

[R] How to pass a variable to a function which use variable name as a parameter

2015-05-26 Thread wong jane
There are functions which use variable names as parameters in some R packages. However, if the variable name is stored in another variable, how can I pass this variable to the function. Taking the "rms" package as an example: library(rms) n <- 1000 age <- rnorm(n, 50, 10) sex <- factor(sample(c('f