Re: [R] lme4 Error Help: “maxstephalfit…pwrssUpdate”

2014-04-28 Thread ONKELINX, Thierry
Dear Craig, It is better to ask questions about lme4 at r-sig-mixed-models (in cc). Are you using a recent version of lme4? Try upgrading lme4 and see if you still get the error. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature

[R] delay evaluation of expression

2014-04-28 Thread Luca Cerone
Dear all, in one of my packages I need to load some data from .Rdata files that are to be used from some functions (but not all off them). I would like to delay the loading of this datasets only when needed. In other cases I successfully used lazyLoad and delayedAssign(), but when I try to load a

[R] linear mixed model for non-normal negative and continous data

2014-04-28 Thread Caroline Lustenberger
Dear all I try to fit a linear mixed model to my data. In short, my dependent variable reflects changes of the bone level (Knmn, in mm), thus this variable is continous and provides negative values. I have two different groups (factor Group) that were measured 3 times each (thus repeated

[R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Christoph Schlächter
Hello, I want to subset a data.frame containing the variables Date in (%Y %m %d ) and N. I want to print Date and N if N is less than or equal to 0.3 and if N is also less than or equal to 0.3 on the day before the day where N is less than or equal to 0.3. This would be the case in line 3 and

[R] Ridge regression for beta and gamma models

2014-04-28 Thread john james
Dear All, Please, is there any package in R that has implemented ridge regression for beta and gamma models? If not, kindly help me to adjust my model below for the beta regression so as to accommodate ridge penalty. Thanks. lbeta - function(par,y,X){ n -length(y) k - ncol(X) beta -

Re: [R] Faster way to transform vector [3 8 4 6 1 5] to [2 6 3 5 1 4]

2014-04-28 Thread xmliu1...@gmail.com
Thanks for your kind replies Jorge's answer helps. warm wishes Xueming xmliu1...@gmail.com From: Jorge I Velez Date: 2014-04-26 23:41 To: xmliu1...@gmail.com CC: r-help Subject: Re: [R] Faster way to transform vector [3 8 4 6 1 5] to [2 6 3 5 1 4] Hi Xueming, Try

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Ivan Calandra
Hi Christoph, I'm not sure I understand your conditions. It is an AND or an OR, i.e. must both conditions be met to subset or any one of them? From your explanation, I would think you really mean AND, but then I don't understand why you would select both lines 3 and 4. I would just say:

Re: [R] average and median values for each of the class

2014-04-28 Thread arun
Hi, I noticed that if ?mean or ?median in fun1 is changed to other functions, for e.g. ?sum, it will show error message. ##Using shortened version that runs library(plyr) fun1 - function(data, .group) {     f1 - function(x) c(x, mean(x, na.rm = TRUE), sum(x, na.rm = TRUE))     res - ddply(data,

[R] Trouble with subset.ffdf

2014-04-28 Thread christian.kamenik
Dear all I am having trouble with subsetting an ffdf object, hopefully somebody can help... I have an index, which is a ff object of vmode logical: index.SAS ff (open) logical length=4977231 (4977231) [1] [2] [3] [4] [5] [6] [7] [8]

Re: [R] Problem with new(er) R version's matrix package

2014-04-28 Thread Martin Maechler
Werner W pensterfuz...@yahoo.de on Sun, 27 Apr 2014 17:48:23 +0100 writes: Dear Martin, Arne, David, Thanks for considering my problem. However, I have a bit of a problem in making a small reproducible example. So far, I tried to drill down into the code and to quick fix this

Re: [R] linear mixed model for non-normal negative and continous data

2014-04-28 Thread ONKELINX, Thierry
Dear Caroline, Check the homogeneity of the variances. If they are inhomogeneous, you can add a variance function to deal with it. However, you will need to switch to the lme() from the nlme package. Best regards, Thierry PS R-Sig-mixed-models is a better list for this kind of questions.

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread arun
Hi, The conditions are not very clear.  Based on the rows you wanted to pick, may be this helps, #It is better to dput() the example.     dat - structure(list(Date = structure(c(14610, 14611, 14612, 14613, 14614, 14615, 14616, 14617, 14618, 14619, 14620, 14621, 14622, 14623, 14624, 14625,

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
Hi Here is a very simple way. mydat - read.table(text= DateN 2010-01-010 2010-01-021.9 2010-01-030 2010-01-040 2010-01-051.6 2010-01-060 2010-01-070.3 2010-01-080 2010-01-091.1 2010-01-101.7 2010-01-112.6 2010-01-120 2010-01-130 2010-01-14

Re: [R] subset of obersevation depending on multiple conditions

2014-04-28 Thread Frede Aakmann Tøgersen
So Christoph now have 3 methods giving him three different results. Of course it is not really clear what Christoph really wants ;-) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance Modeling Technology Service Solutions T +45 9730 5135 M

[R] Forecast Package in R version 3.1.0

2014-04-28 Thread Paul Bernal
Dear R community, hello, Hope everybody is doing great. I just downloaded R version 3.1.0, and, whenever I try to load the forecast package, the following error message appears: Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘Rcpp’

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Paul Bernal
Dear Duncan, This is what is happening when I try downloading the Rcpp package in R version 3.1.0 Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘Rcpp’ Error: package or namespace load failed for ‘forecast’ 2014-04-28 10:27

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Duncan Murdoch
On 28/04/2014 11:22 AM, Paul Bernal wrote: Dear R community, hello, Hope everybody is doing great. I just downloaded R version 3.1.0, and, whenever I try to load the forecast package, the following error message appears: Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck =

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Dirk Eddelbuettel
Paul Bernal paulbernal07 at gmail.com writes: This is what is happening when I try downloading the Rcpp package in R version 3.1.0 Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘Rcpp’ Error: package or namespace load failed

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Rich Shepard
On Mon, 28 Apr 2014, Dirk Eddelbuettel wrote: That is conflicting with the fact that the package page for Rcpp shows you binaries for three R versions (devel, release, old-release) on Windows three R versions (devel, release, old-release) on OS X 'snow leopard' one R version (release) on OS

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Rui Barradas
Hello, Or maybe better, install.packages(forecast, dependencies = TRUE) since package forecast depends on several other packages Hope this helps, Rui Barradas Em 28-04-2014 17:04, Rich Shepard escreveu: On Mon, 28 Apr 2014, Dirk Eddelbuettel wrote: That is conflicting with the fact that

[R] Job openings for 2 statisticians at Roche in Basel, Switzerland

2014-04-28 Thread Bert Gunter
Roche Pharmaceuticals has openings for two nonclinical statisticians at its Basel, Switzerland RD site. The positions' initial focus will be working with process and formulation chemists. A solid background in linear models, Design of Experiments, and English fluency are minimal requirements.

Re: [R] Forecast Package in R version 3.1.0

2014-04-28 Thread Duncan Murdoch
On 28/04/2014 11:31 AM, Paul Bernal wrote: Dear Duncan, This is what is happening when I try downloading the Rcpp package in R version 3.1.0 Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called ‘Rcpp’ Error: package or namespace load

Re: [R] LogLikelihood of a Distribution Given Fixed Parameters

2014-04-28 Thread Jacob Warren (RIT Student)
Thanks Rolf. That took care of it. It should be lower=FALSE through right? I want the upper tail because my values are right censored? Regards, Jake On Fri, Apr 25, 2014 at 12:50 AM, Rolf Turner r.tur...@auckland.ac.nzwrote: As usual I am too lazy to fight my way through the rather convoluted

[R] Label customization in R plots

2014-04-28 Thread Ayan Mitra
Hi all, I am a new comer in R . i am trying to figure out how to put in the label of a plot the basic statistics values like mean= no of data = media = chi-square = in a box. I tried a lot to search over the net but couldn't find one as

Re: [R] lme4 Error Help: “maxstephalfit…pwrssUpdate”

2014-04-28 Thread Craig O'Connell
Thanks. I used the most current version of lme4 that is why I was a bit concerned. My data seems appropriate and with lme4 working last week on a very similar data set, I was left a bit confused. Since I only starting implementing this technique, does anybody have some pointers on what I

Re: [R] about rect.hclust

2014-04-28 Thread chris Jhon
Thank you all for your kind help. On Sat, Apr 26, 2014 at 7:03 PM, Tal Galili tal.gal...@gmail.com wrote: Thank you for mentioning the dendextendhttp://cran.r-project.org/web/packages/dendextend/package Gregory. As I mention in the package, the dendextend package implements a similar

[R] About lm(y~1)

2014-04-28 Thread Alejo C.S.
Dear list, Reading a function I found this: lm ( y ~ 1 ) I know that Y ~ -1 + A is a straight-line with no y-intercept; that is, a fit forced through (0,0). But I never saw the first example. Any tip? Thanks in advance! C. [[alternative HTML version deleted]]

[R] Color points in princomp() plot

2014-04-28 Thread Noah Silverman
Hi, The princomp() function has a nice method to generate a pretty biplot of the data. I have some data where the points are divided into a few groups. My intention is to generate a biplot, using princomp, but color the points based on group membership. The hope is that points will show some

Re: [R] About lm(y~1)

2014-04-28 Thread Rui Barradas
Hello, That will compute a fit with coefficient equal to mean(y) and std error equal to sd(y)/sqrt(length(y)) Hope this helps, Rui Barradas Em 28-04-2014 19:35, Alejo C.S. escreveu: Dear list, Reading a function I found this: lm ( y ~ 1 ) I know that Y ~ -1 + A is a straight-line with

Re: [R] Label customization in R plots

2014-04-28 Thread David Winsemius
On Apr 28, 2014, at 10:47 AM, Ayan Mitra wrote: Hi all, I am a new comer in R . i am trying to figure out how to put in the label of a plot the basic statistics values like mean= no of data = media = chi-square = In base graphics you

[R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Fong Chun Chan
Hi, I am trying to get the R package Cairo installed. I've been successfully in building the latest version of Cairo library (1.12.16, http://cairographics.org/) from source and installed into ~/usr/local using ./configure --prefix=/home/fong/usr/local I set the my CAIRO_LIBS and CAIRO_CLAGS

Re: [R] Label customization in R plots

2014-04-28 Thread David Carlson
You can also use the legend() function which will draw the box and arrange the text in a single column (or three columns if you want a single row). It also has shortcuts for positioning the box such as topleft or bottomright. ?legend for more details. - David

Re: [R] Label customization in R plots

2014-04-28 Thread Bert Gunter
See also ?panel.text for lattice. This presumes that you know how to use panel functions, however. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon,

[R] Color points in princomp() plot

2014-04-28 Thread Noah Silverman
Hi, The princomp() function has a nice method to generate a pretty biplot of the data. I have some data where the points are divided into a few groups. My intention is to generate a biplot, using princomp, but color the points based on group membership. The hope is that points will show some

[R] SVEC with exogen vector

2014-04-28 Thread Denise Manfredini
Hi, I using the package vars to implement a SVEC model, however I have to include a exogen vector that's not a dummy. I try to use the tsDyn package but I don't see a solution for my problem. So I need to know if any package allow me to do that. thanks, Denise [[alternative HTML

[R] About Tree Package

2014-04-28 Thread Si Qi L.
Hi, I will be very grateful if you can give a help on my problem. I am really stuck on it now. The problem is that I need to construct a classification tree model and prune tree in order to test the learning dataset for getting its sensitivity and specificity. But my codes seems wrong somewhere,

Re: [R] Color points in princomp() plot

2014-04-28 Thread David Winsemius
On Apr 28, 2014, at 2:41 PM, Noah Silverman wrote: Hi, The princomp() function has a nice method to generate a pretty biplot of the data. I have some data where the points are divided into a few groups. My intention is to generate a biplot, using princomp, but color the points based on

Re: [R] Label customization in R plots

2014-04-28 Thread Jim Lemon
On 04/29/2014 03:47 AM, Ayan Mitra wrote: Hi all, I am a new comer in R . i am trying to figure out how to put in the label of a plot the basic statistics values like mean= no of data = media = chi-square = in a box. I tried a lot to

Re: [R] LogLikelihood of a Distribution Given Fixed Parameters

2014-04-28 Thread Rolf Turner
Indeed it should be lower=FALSE. Du! Sorry 'bout that! cheers, Rolf On 29/04/14 02:51, Jacob Warren (RIT Student) wrote: Thanks Rolf. That took care of it. It should be lower=FALSE through right? I want the upper tail because my values are right censored? Regards, Jake On Fri, Apr

Re: [R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Rolf Turner
Probably not much help to you, but for what it's worth: * on my system cairo.h is in /usr/include/cairo Perhaps the CAIRO flags that you set are not adequately guiding the search. * you need to have the *development* version of cairo installed; on my system (Fedora 17) I do: sudo

Re: [R] delay evaluation of expression

2014-04-28 Thread William Dunlap
I have tried, but it doesn't help because when you use the load_all() function of devtools, the datasets are not lazyLoaded but fully evaluated.. Does LazyLoad:yes in yourPackage/DESCRIPTION work for you when you use the command line 'R CMD INSTALL yourPackage? I don't use devtools, but

Re: [R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Peter Langfelder
Make sure you have cairo-devel installed, and remove the lines export CAIRO_LIBS=${HOME}/usr/local/lib export CAIRO_CFLAGS=${HOME}/usr/local/include from your .bashrc file. If you have cairo-devel installed normally, the headers should be found with default settings of all search paths. The

Re: [R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Fong Chun Chan
Hi Peter, Thanks for the reply. I don't have access to the package manager unfortunately as I am working on a cluster where I don't have admin. So everything has to installed into my ~/export CAIRO_LIBS=-L${HOME}/usr/local/ lib export CAIRO_CFLAGS=-I${HOME}/usr/local/include /local. I tried

Re: [R] Color points in princomp() plot

2014-04-28 Thread Boris Steipe
At first I thought this is easy: use the same strategy you use for all of these types of questions. Plot with type=n to suppress output of points, then use points() or text() to get the colors and shapes and whatnot you need ... Turns out biplot() does not use a type argument ... ... and you

[R] problems with cloropleth map of Japan

2014-04-28 Thread Guadalupe Bastos
Hi: I have recently started working with creating maps in R. I have been able to create cloropleth maps for Europe without a problem. However, when I try doing the same for Japan, which shapefile is downloaded from the website http://gadm.org/country , R stops working. The message that pops up is

Re: [R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Fong Chun Chan
Thanks Peter. From the config.log file, the issue appears to occur here at the */home/fong/Cairo/conftest.c:28: undefined reference to `cairo_create'* - configure:3631: gcc -std=gnu99 -o conftest -g -O2 -I/home/fong/usr/local/include/cairo conftest.c -lz -L/home/fong/usr/local/lib 5

[R] Fwd: problem with kmeans

2014-04-28 Thread cassie jones
Dear R-users, I am trying to run kmeans on a set comprising of 100 observations. But R somehow can not figure out the true underlying groups, although other software such as Jmp, MINITAB are producing the desired result. Following is a brief example of what I am doing. library(stringdist)

Re: [R] Fwd: problem with kmeans

2014-04-28 Thread Ranjan Maitra
Cassie, I am sorry but do you even know what k-means does? That it is a locally optimal algorithm. That different software implement the same algorithm differently. FYI, R uses the Hartigan-Wong (1979) algorithm by default, which is probably the most efficient out there. I suggest you first go

Re: [R] R Cairo Installation - Cannot find cairo.h!

2014-04-28 Thread Peter Langfelder
I **think** the linker is missing a directive to actually link in the cairo library. Try adding -lcairo to the LIB flags, something like export CAIRO_LIBS='-L${HOME}/usr/local/lib -lcairo' or simply export CAIRO_LIBS=-l${HOME}/usr/local/lib/libcairo.so I am not 100% sure of the syntax, but

Re: [R] Fwd: problem with kmeans

2014-04-28 Thread Peter Langfelder
You are using the wrong algorithm. You want Partitioning around Medoids (PAM, function pam), not k-means. PAM is also known as k-medoids, which is where the confusion may come from. use library(cluster) cl = pam(dis, 4) and see if you get what you want. HTH, Peter On Mon, Apr 28, 2014 at