Re: [R] Issue with 95% CI using MASS{confint}

2015-05-28 Thread Jennifer Sweatman
Hi all, Thank you for your responses. Unfortunately, setting level=0.951 or 0.94 did not work for me. I followed your code, Duncan, and some of my tau values are less than 2. I don't know how to interpret this information, however. Can you point me in the direction to a reference?

Re: [R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread Bert Gunter
I also am not sure exactly what the OP wants and even less sure of what he needs... But a possible answer is that a canonical way to do this is just to pass down the ... list in the definition and specifying a named list of arguments in the call (as has already been mentioned). e.g. consider:

Re: [R] Issue with 95% CI using MASS{confint}

2015-05-28 Thread Duncan Murdoch
On 28/05/2015 1:11 PM, Jennifer Sweatman wrote: Hi all, Thank you for your responses. Unfortunately, setting level=0.951 or 0.94 did not work for me. I followed your code, Duncan, and some of my tau values are less than 2. I don't know how to interpret this information, however. Can

Re: [R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread Duncan Murdoch
On 28/05/2015 1:40 PM, Luca Cerone wrote: Hi everybody, this is probably a silly question, but I can't find a way to recognize the names that are passed to variables in ellipsis. For example, say I have a core function that receives some extra parameters through ... e.g. f -

[R] best way to handle database connections from within a package

2015-05-28 Thread Luca Cerone
Dear all, I am writing a package that is a collection of queries to be run against a postgresql database, so that the users do not have to worry about the structure of the database. In my package I import dbDriver, dbUnloadDriver, dbConnect, dbDisconnect from the package DBI and dbGetQuery from

Re: [R] Remove entry with sensitive information from history

2015-05-28 Thread Luca Cerone
Thanks to you all for your help! I see Brian's answer as good when I want to prompt the user for a password (when they set the profile for example) and I would like to know how to mask the input there. Henrik's answer seems the closest to what I would like to achieve, but you are right if they

[R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-28 Thread C W
Dear R list, I am trying to do use the R.matlab library, I did the following, but it does not work. library(R.matlab) Error in loadNamespace(j - i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘R.methodsS3’ Error: package or namespace load failed for

Re: [R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread David Winsemius
On May 28, 2015, at 11:03 AM, Duncan Murdoch wrote: On 28/05/2015 1:40 PM, Luca Cerone wrote: Hi everybody, this is probably a silly question, but I can't find a way to recognize the names that are passed to variables in ellipsis. For example, say I have a core function that receives

[R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread Luca Cerone
Hi everybody, this is probably a silly question, but I can't find a way to recognize the names that are passed to variables in ellipsis. For example, say I have a core function that receives some extra parameters through ... e.g. f - function(...) { params - c(...) #dothehardworkhere

Re: [R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread Duncan Murdoch
On 28/05/2015 1:40 PM, Luca Cerone wrote: Hi everybody, this is probably a silly question, but I can't find a way to recognize the names that are passed to variables in ellipsis. For example, say I have a core function that receives some extra parameters through ... e.g. f - function(...) {

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-28 Thread Henrik Bengtsson
For some unknown reason, you've managed to install R.matlab without the dependency R.methodsS3 (cf. http://cran.r-project.org/web/packages/R.matlab/) or it happened due to some other glitch somewhere. Try to reinstall R.matlab. If that doesn't help, explicitly install R.methodsS3 and retry. If

[R] analysis of variance test

2015-05-28 Thread Nezahat HUnter
Let's say I have 12 observation of 5 variables and my first variable is categorical (with 4 different levels). I am trying to find out statistical significance difference between these categorical levels for each variable, but my  function is not working! Please note that my data x are in

Re: [R] Collinearity? Cannot get logisticRidge{ridge} to work

2015-05-28 Thread Kengo Inagaki
Dr. Dalgaard, Thank you for further clarifying the problem. I found a few possible solutions on internet, and will try to find the solution. This was my first time to post questions on this mailing list, and I learned quite a bit though working on this problem. I apologize for any impoliteness

Re: [R] Problem with particular file in XML package?

2015-05-28 Thread Gen
Keith Jewell-2 wrote The OP asked Has anyone else had trouble with the XML package lately and if so, how did you resolve it? For what it's worth... I failed to install XML using install() with the defaults; I can't remember the exact error message, something about access denied.

Re: [R] Using names in function with ellipsis (non standard evaluation?)

2015-05-28 Thread Luca Cerone
Thanks a lot to all of you for the help! Duncan's solution is what I was looking for! In my examples I assumed that if f(...) is called by g then the names I use in g were transferred to f, which is not true. But calling f as Duncan explained ( g - function(x,y) f(x=x,y=y) ) solves the issue!

Re: [R] Problem with particular file in XML package?

2015-05-28 Thread Keith Jewell
The OP asked Has anyone else had trouble with the XML package lately and if so, how did you resolve it? For what it's worth... I failed to install XML using install() with the defaults; I can't remember the exact error message, something about access denied. Downloading XML_3.98-1.1.zip

Re: [R] Problem with particular file in XML package?

2015-05-28 Thread Prof Brian Ripley
This really should have been sent to the package maintainer. But that the zip file is corrupt has been reported several times, and does not block installation for anyone else, so your (plural) diagnosis is wrong. On 28/05/2015 03:56, Gen wrote: I have been attempting to install the R

Re: [R] Using lapply when there are dependencies

2015-05-28 Thread Jeff Newmiller
For loops are not slow. Inefficient memory management in for loops is slow. Feel free to preallocate your output vectors and write for loops to your heart's content. If you really want speed you can write this in C++ using Rcpp [1]. If your f() is a standard digital filter algorithm this has

[R] Reset running R session to --vanilla state?

2015-05-28 Thread Rainer M Krug
Hi Is there a way of resetting R to the --vanilla state *without closing and restarting* R, i.e. all packages un-loaded (except the ones loaded automatically in --vanilla), all options reset, dev() closed, environments detached and deleted, ...? , | Version |_

[R] ..lsmeans and coxme..

2015-05-28 Thread Matthias Kuhn
Dear list-eners, I run into the following problem when I want to get contrasts from a coxme model using the lsmeans package: A call to lsmeans on the coxme model throws the following error: Error in if (adjustSigma object$method == ML) V = V * object$dims$N/(object$dims$N - : missing value

Re: [R] Using lapply when there are dependencies

2015-05-28 Thread David Winsemius
On May 27, 2015, at 4:34 PM, blue honour via R-help wrote: Hi all, Let's say I have a vector: vv-c(1,2,3) And suppose I have a function f(a,b), which is a function of 2 scalar inputs. I would like to evaluate this function separately for each element of the vv vector while the

Re: [R] Using lapply when there are dependencies

2015-05-28 Thread PIKAL Petr
Hi -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of blue honour via R-help Sent: Thursday, May 28, 2015 1:34 AM To: r-help@r-project.org Subject: [R] Using lapply when there are dependencies Hi all, Let's say I have a vector: vv-c(1,2,3)

Re: [R] Reset running R session to --vanilla state?

2015-05-28 Thread Rainer M Krug
Duncan Murdoch murdoch.dun...@gmail.com writes: On 28/05/2015 4:52 AM, Rainer M Krug wrote: Hi Is there a way of resetting R to the --vanilla state *without closing and restarting* R, i.e. all packages un-loaded (except the ones loaded automatically in --vanilla), all options reset, dev()

Re: [R] Collinearity? Cannot get logisticRidge{ridge} to work

2015-05-28 Thread peter dalgaard
On 28 May 2015, at 00:06 , Kengo Inagaki kengoing...@gmail.com wrote: I did not understand complete separation quite well.. Thank you very much for clarification. Kengo 2015-05-27 17:03 GMT-05:00 David Winsemius dwinsem...@comcast.net: On May 27, 2015, at 3:00 PM, Kengo Inagaki wrote:

Re: [R] Reset running R session to --vanilla state?

2015-05-28 Thread Duncan Murdoch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 28/05/2015 4:52 AM, Rainer M Krug wrote: Hi Is there a way of resetting R to the --vanilla state *without closing and restarting* R, i.e. all packages un-loaded (except the ones loaded automatically in --vanilla), all options reset, dev()

Re: [R] R CMD methods and ggplot2 advice

2015-05-28 Thread Rolf Turner
On 27/05/15 23:37, Thierry Onkelinx wrote: Dear Glenn, Suppose this function test - function(df){ ggplot(df, aes(x = gp, y = y)) + geom_point() } Then R CMD check will consider gp and y as global variables since they are undefined. Because R CMD check cannot detect that gp and y will be

Re: [R] R CMD methods and ggplot2 advice

2015-05-28 Thread Thierry Onkelinx
Dear Rolf, utils::globalVariables() seems to work package wide. I prefer to ignore these variable only within the function in which I explicitly define them. If I use one of those variables in another function in which I haven't declared them as global, then I want R CMD check to give me a NOTE.

Re: [R] Really stuck with the nls function!! It's Urgent !!

2015-05-28 Thread Adams, Jean
I can't answer your question, but I can help you get help by re-writing your code so it's easy for others to see what you're talking about ... Jean library(expm) apinene_modele_prediction - function(t, theta) { x0 = c(100, 0, 0, 0, 0) A = matrix(c( -(theta[1]+theta[2]), theta[1],

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

2015-05-28 Thread Prof J C Nash (U30A)
I have a section (6.4.2) about singular gradient (actually singular Jacobian to numerical analysts) in my recent book Nonlinear parameter optimization using R tools. nls() is prone to this, though having all the starting values the same in many functions can be asking for trouble of this sort, as

Re: [R] Problem with particular file in XML package?

2015-05-28 Thread Hadley Wickham
I have also seen this problem on a student's windows machine (with R 3.2.0 and on multiple mirrors). It appeared that the package zip itself was being corrupted (with an error to the tune of downloaded file size does not agree with actual file size). The most likely explanation that I could come

Re: [R] Problem with comparing multiple data sets

2015-05-28 Thread John Kane
Lovely solution Mohammed. I had not even heard of the modeest package. For names, I'd just create another data.frame mode.names - data.frame(df[,1], Out) John Kane Kingston ON Canada -Original Message- From: dcarl...@tamu.edu Sent: Thu, 28 May 2015 00:31:45 + To:

Re: [R-es] problemas con tryCatch

2015-05-28 Thread Sergio Castro
Muchas gracias, Eso me ayuda en casi todo lo que necesito, a excepción del return. Si meto un return dentro del error, falla y sale del tryCatch, siguiendo con la ejecución. Mi flujo es el siguiente: Tengo una función A que llama a la función B. En la función B tengo el tryCatch. Si se produce un

Re: [R-es] La ejecución de mi script R es muy lenta

2015-05-28 Thread javier.ruben.marcuzzi
Estimada María Luz Morales Puedes intentar con data.table y reemplazar for por algina otra opción vectorizada, aunque en R moderno esto mejoró, y la posibilidad de compile debería ser evaluada. Javier Rubén Marcuzzi Técnico en Industrias Lácteas Veterinario De: MªLuz Morales Enviado

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread Sarah Goslee
Hello, Now I have changed the file to a new file as RData.csv file and now when I use the below code it gives me an error graph- read.csv(RData.csv, header = TRUE) Here you read RData.csv into R as a data frame named graph. MonthlyWeight-by(RData$Weight,names.arg = RData$Month,sum) So

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread Shivi82
HI David, So if I understand from your post below, when we import a file in R- we need to make sure that the variable names do not have any space nor they should be in special characters or not in comma format. Please correct me I am wrong. Now I have changed the file to a new file as RData.csv

Re: [R-es] La ejecución de mi script R es muy lenta

2015-05-28 Thread MªLuz Morales
Hola, gracias por contestar tan rápido. En el email he adjuntado los archivos seta y outcomes.csv, no me queda claro como hacer para que podáis acceder a ellos de otra manera. El 28 de mayo de 2015, 15:53, Carlos Ortega c...@qualityexcellence.es escribió: Hola, Si no tienes inconveniente en

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread Kristina Wolf
I don't know why that doesn't work, but try adding in sep=, In your read.csv() That shouldn't matter as to whether or not it recognizes your object though, but it will matter in how your object is read. Other simple things might be to make sure the file is saved and then close it out to make

Re: [R] Issue with 95% CI using MASS{confint}

2015-05-28 Thread sami . toppinen
I encountered the same problem today. It seems to occur only when you use exactly 95 % as the confidence level. For example: confint(g1) Waiting for profiling to be done... 2.5% 97.5% a0 1.257512 1.330881 KP NA 163.862932 confint(g1, level = 0.95) Waiting for profiling

Re: [R] Can't seem to install packages

2015-05-28 Thread Duncan Murdoch
On 28/05/2015 6:10 AM, Claire Rioualen wrote: Hello, I can't seem to install R packages, since it seemed there were some permission problems I chmoded /usr/share/R/ and /usr/lib/R/. However, there are still errors in the process. Here's my config: sessionInfo() R version 3.1.1 (2014-07-10)

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread David Winsemius
Adding back context which was omitted by this Nabble user who still does not understand the mailing list conventions: On May 27, 2015, at 2:28 AM, Shivi82 wrote: Hello All, I need help on creating a histogram for one of my data. The data is as below (sample): MFST_WT Hours PROCESS

Re: [R] Using lapply when there are dependencies

2015-05-28 Thread blue honour via R-help
Thank you. May I ask, what would you recommend reading in order to learn how to vectorise loops with dependencies using data.table facilities? I have been searching online on this topic since last night but no luck yet. On Thu, 5/28/15, David

Re: [R] Identifying peak periods of observations in circular yearly data

2015-05-28 Thread Jim Lemon
Hi Daisy, Let me rephrase what I said. Are you looking for 80% of bird breeding observations for a given species in a calendar year (I think not), or in the breeding season for that species, which may not be strongly linked to a calendar year? Your example data, when plotted like this:

[R] Can't seem to install packages

2015-05-28 Thread Claire Rioualen
Hello, I can't seem to install R packages, since it seemed there were some permission problems I chmoded /usr/share/R/ and /usr/lib/R/. However, there are still errors in the process. Here's my config: sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-pc-linux-gnu (64-bit) locale:

Re: [R] Issue with 95% CI using MASS{confint}

2015-05-28 Thread Duncan Murdoch
On 28/05/2015 9:08 AM, sami.toppi...@kolumbus.fi wrote: I encountered the same problem today. It seems to occur only when you use exactly 95 % as the confidence level. For example: confint(g1) Waiting for profiling to be done... 2.5% 97.5% a0 1.257512 1.330881 KP NA

Re: [R] Help on Histogram ~ Barplot

2015-05-28 Thread Bert Gunter
Unless I have missed something somewhere, the object is named graph not RData . Further, the call to by() is complete nonsense, with arguments misspecified -- there is no names.arg argument to by() (the 2nd argument is named INDICES) It appears that some people need to spend some time with R

Re: [R] Can't seem to install packages

2015-05-28 Thread Claire Rioualen
Hello, Indeed I've had a lot of dependencies issues, but I'm solving them one after the other. Thanks for your time! CR On Thu, May 28, 2015 at 5:33 PM, Martin Morgan mtmor...@fredhutch.org wrote: On 05/28/2015 08:21 AM, Duncan Murdoch wrote: On 28/05/2015 6:10 AM, Claire Rioualen wrote:

Re: [R] Can't seem to install packages

2015-05-28 Thread Martin Morgan
On 05/28/2015 08:21 AM, Duncan Murdoch wrote: On 28/05/2015 6:10 AM, Claire Rioualen wrote: Hello, I can't seem to install R packages, since it seemed there were some permission problems I chmoded /usr/share/R/ and /usr/lib/R/. However, there are still errors in the process. Here's my config: