Re: [R] How to rebuild an R package that has been removed from CRAN?

2013-08-20 Thread Shang Zuofeng
So this is an alternative method. The package can be installed from source() rather than rebuilt. Although the warnings exist, the package itself may still be useful. Can you let me know how to installed from source? Thanks a lot! Zuofeng 2013/8/19 David Winsemius dwinsem...@comcast.net On

Re: [R] Appropriateness of R functions for multicore

2013-08-20 Thread Hopkins, Bill
I wrap functions to run via multicore with tryCatch() to gather stats on failure rate and capture state. I'm still interested in how/whether core fuctions were verified as being threadsafe. Bill Hopkins Written using a virtual Android keyboard... -- Original message -- From:

[R] Interpreting lmp() results

2013-08-20 Thread Ann Marie Reinhold
I am running permutation regressions in package lmPerm using lmp(). I am getting what I find to be confusing results and I would like help understanding what is going on. To illustrate my problem, I created a simple example and am running lmp() such that the results of the lmp() models should be

Re: [R] Appropriateness of R functions for multicore

2013-08-20 Thread Prof Brian Ripley
On 20/08/2013 03:13, Hopkins, Bill wrote: I wrap functions to run via multicore with tryCatch() to gather stats on failure rate and capture state. I'm still interested in how/whether core fuctions were verified as being threadsafe. What does 'threads' have to do with this? Multicore

[R] function on columns of two arrays

2013-08-20 Thread Folkes, Michael
I've spent a bit too long searching the help history and attempting to apply some logic to the following: I have two 3D arrays each with same dim. I wish to run lm on the respective columns of each array, preferably without loops. We often hear chatter that sometimes apply() won't be faster just

Re: [R] Interpreting lmp() results

2013-08-20 Thread Bert Gunter
I suggest you post (a shortened version of?) your tome to the r-sig-ecology list instead. Cheers, Bert On Mon, Aug 19, 2013 at 3:47 PM, Ann Marie Reinhold reinh...@montana.edu wrote: I am running permutation regressions in package lmPerm using lmp(). I am getting what I find to be confusing

[R] Change number of rows in console

2013-08-20 Thread TMiller
Hello This is probably a really basic question, still I couldn't find an answer in the web. I am running more than 200 regressions, but I can only see about 40 in the console display. Is there any possibility to change the number of rows which are displayed in the console? Many thanks already in

Re: [R] Change number of rows in console

2013-08-20 Thread Prof Brian Ripley
On 20/08/2013 09:58, TMiller wrote: Hello This is probably a really basic question, still I couldn't find an answer in the web. I am running more than 200 regressions, but I can only see about 40 in the console display. Is there any possibility to change the number of rows which are displayed in

[R] Visualising SOM as hexagonal heatmaps

2013-08-20 Thread Adam Szałucha
I have a kohonen object generated with grid parameters grid = somgrid(20, 20, hexagonal). Standard plot shows the codebook vectors for all variables. I want to have a hexagonal heatmap for each variable. I found in Applied Spatial Data Analysis with R code to generate hexagonal grid. library(sp)

[R] Problems installing FAME package on Windows 7.

2013-08-20 Thread Andreas Dibiasi
I have problems to install the FAME package. I have installed the fame client 9.3.32.2 and the environmental variable is set. However, for some reason, the warnings error: argument lib.loc is missing, with no default pops up under the i386 installation and LoadLibrary failure: %1 is not a valid

Re: [R] Change number of rows in console

2013-08-20 Thread TMiller
I am sorry for the confusing message. I am using R-Studio. In the picture you see a print screen, I mean the console at the bottom left. I am using Mac OS X. If anyone could help me, I'd really appreciate it. Many thanks Tom

Re: [R] function on columns of two arrays

2013-08-20 Thread arun
Hi, May be this helps.   a1- data.frame(a)  b1- data.frame(b)  lapply(seq_len(ncol(a1)),function(i) lm(b1[,i]~a1[,i]))  lapply(seq_len(ncol(a1)),function(i) summary(lm(b1[,i]~a1[,i]))$coef) A.K. - Original Message - From: Folkes, Michael michael.fol...@dfo-mpo.gc.ca To:

Re: [R] function on columns of two arrays

2013-08-20 Thread arun
Also, if you need ?mapply() linRegFun- function(x,y){  res- summary(lm(y~x))$coef}  res1-sapply(seq_len(ncol(a1)),function(i) summary(lm(b1[,i]~a1[,i]))$coef)  res2-mapply(linRegFun,a1,b1) attr(res2,dimnames)-NULL identical(res1,res2) #[1] TRUE A.K. - Original Message - From: arun

Re: [R] Appropriateness of R functions for multicore

2013-08-20 Thread Hadley Wickham
For tasks which don't involve I/O but fail with mclapply, how does one work out where the problem is? The handy browser() function which allows for interactive diagnosis won't work with parallel jobs. What other approaches can one use? ?dump.frames - interactive debugging after the fact.

Re: [R] Change number of rows in console

2013-08-20 Thread Berend Hasselman
On 20-08-2013, at 13:40, TMiller thomas.muel...@student.unisg.ch wrote: I am sorry for the confusing message. I am using R-Studio. In the picture you see a print screen, I mean the console at the bottom left. I am using Mac OS X. If anyone could help me, I'd really appreciate it. Many thanks

Re: [R] Change number of rows in console

2013-08-20 Thread Jeff Newmiller
Then you are asking your question in the wrong forum. RStudio has their own support website. Please read the Posting Guide and list topic info before posting again. Many people also find [1] helpful in getting of on the right foot here. [1]

[R] Confidence Intervals for survreg (survival)

2013-08-20 Thread Luis Antunes
Hello, I am fitting a weibull regression model to a survival data set, using survreg from the survival package.I would like to obtain the confidence interval for the regression coefficients estimates, but I not seeing how.Can anyone help me? Thanks,Luis

[R] The easi Package - incorporating panel data?

2013-08-20 Thread n.g.chalmers
Hi, Does anybody know how to incorporate panel data into Hoareau et al *easi* Package? In Hoareau et al easi Package they use cross sectional data and I would like to know how I could include 5 years worth of panel data? Many thanks, Neil -- View this message in context:

[R] using functions from other packages in own package

2013-08-20 Thread Jannis
Dear R community, I am creating my own package which uses functions from other packages. After reading several books/help pages I now would do the following to safely use some functions from other packages: 1. list them in Imports: (DESCRIPTION file) 2. put importFrom(packagename,

Re: [R] using functions from other packages in own package

2013-08-20 Thread Prof Brian Ripley
On 20/08/2013 15:51, Jannis wrote: Dear R community, I am creating my own package which uses functions from other packages. After reading several books/help pages I now would do the following to safely use some functions from other packages: 1. list them in Imports: (DESCRIPTION file) 2. put

[R] igraph vertex.label.font sans serif

2013-08-20 Thread Witold E Wolski
Would like to plot vertex labels without serif. there is vertex.label.font param but he lets me choose only between one font type in normal bold and emph. any suggestions welcome. -- Witold Eryk Wolski __ R-help@r-project.org mailing list

Re: [R] igraph vertex.label.font sans serif

2013-08-20 Thread Witold E Wolski
recall. it's: vertex.label.family sorry On 20 August 2013 17:30, Witold E Wolski wewol...@gmail.com wrote: Would like to plot vertex labels without serif. there is vertex.label.font param but he lets me choose only between one font type in normal bold and emph. any suggestions welcome.

Re: [R] lasso cross-validation

2013-08-20 Thread Adams, Jean
Samuel, Typically when someone specifies 10-fold cross validation, it implies that a single series of 10 validations are run. No repeats. You can read more about cross-validation here ... http://en.wikipedia.org/wiki/Cross-validation_(statistics)#K-fold_cross-validation . Jean On Mon, Aug

Re: [R] function on columns of two arrays

2013-08-20 Thread Law, Jason
library(abind) library(plyr) c - abind(a,b, along = 4) results - alply(c, c(2,3), function(x) lm(x[,2] ~ x[,1])) ldply(results, function(x) summary(x)$coef) Jason Law Statistician City of Portland Bureau of Environmental Services Water Pollution Control Laboratory 6543 N Burlington Avenue

Re: [R] function on columns of two arrays

2013-08-20 Thread Folkes, Michael
Well that was frightfully simple. It's true that if data structure allows it seems best to flatten the data, yes? Thanks to A.K. Michael -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: August 20, 2013 4:43 AM To: Folkes, Michael Cc: R help Subject: Re: [R] function

Re: [R] function on columns of two arrays

2013-08-20 Thread Folkes, Michael
I know have multiple ways to skin the metaphorical cat. Thanks to Jason and A.K. Michael -Original Message- From: Law, Jason [mailto:jason@portlandoregon.gov] Sent: August 20, 2013 9:54 AM To: Folkes, Michael Cc: R help Subject: RE: function on columns of two arrays library(abind)

Re: [R] Change number of rows in console

2013-08-20 Thread John Kane
Really a question for RStudio support and I don't know if this is still true http://support.rstudio.org/help/discussions/questions/724-console-line-limit but I'd also suggest just using sink() and viewing the results in a text editor or word processor. John Kane Kingston ON Canada

[R] How to apply a function to every element of a dataframe, when the function uses for each colummn and row different values to calculate with?

2013-08-20 Thread Jacqueline Oehri
Dear R users I have a question concerning applying a function to each element of a dataframe: 1) -- I have a dataframe like this: d: (columnames: names of Landcovertypes, rownames: coordinates, nr: rowsums, nc:colummnsums) (look at the end of the mail for the structure of d, dput(d) ) here, d

Re: [R] function on columns of two arrays

2013-08-20 Thread Folkes, Michael
Here's a tiny summary of the speed results using different methods to run lm on common columns from two arrays. Sadly looping is fastest. I don't know if any are sensitive to array dimensions (more columns, fewer layers etc). I invite correction, or suggestions for improvement to avoid looping.

Re: [R] R code queries

2013-08-20 Thread Rui Barradas
Hello, Address your questions to R-Help, please: r-help@r-project.org I don't use VBA, so I can't help you with what you need. Does your code run in R? As a first line of code, you should have written library(forecast) rest of answer inline. Em 20-08-2013 17:10,

Re: [R] function on columns of two arrays

2013-08-20 Thread arun
Hi Michael, I run it on my system after deleting one of the lines from method1 (as it was not necessary) method1 - function(){   a1- data.frame(a)   b1- data.frame(b)   lapply(seq_len(ncol(a1)),function(i) summary(lm(b1[,i]~a1[,i]))$coef) } linRegFun- function(x,y){  res-

Re: [R] function on columns of two arrays

2013-08-20 Thread Folkes, Michael
That's much more fair I failed to note that extra line of work. Good to know looping can be avoided. Thanks! -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: August 20, 2013 11:11 AM To: Folkes, Michael Cc: R help Subject: Re: function on columns of two arrays Hi

Re: [R] SEM polychoric lavaan

2013-08-20 Thread yrosseel
On 08/12/2013 05:55 PM, Pablo Menese Camargo wrote: fitcfa - cfa(mcfa, data = data_analisis) summary(fitcfa, standardized = TRUE, fit.measure=TRUE) standardizedSolution(fitcfa, type = std.all) anyone know what y should do to apply polychoric? See the manual:

Re: [R] Confidence Intervals for survreg (survival)

2013-08-20 Thread David Winsemius
On Aug 20, 2013, at 7:04 AM, Luis Antunes wrote: Hello, I am fitting a weibull regression model to a survival data set, using survreg from the survival package.I would like to obtain the confidence interval for the regression coefficients estimates, but I not seeing how.Can anyone help

Re: [R] R code queries

2013-08-20 Thread Richard M. Heiberger
You have been trapped by attempting to use double quotes inside double quotes. Use single quotes on the inside “etsz - ets(zz,model='ZZZ') Please send only minimal data to the list. dput(head(mydata)) is the preferred format. That way a reader of this list can pick it up from the email and

[R] multiple core

2013-08-20 Thread Andrea Lamont
Hello: I have somewhat of a generic question. How do you use multiple CPU/core processors in R? For those familiar with Mplus software, I'm looking for something analogous to PROCESSORS command in Mplus to speed up processing. I searched previous helps/googled it and see that there is a

[R] italic(mu)

2013-08-20 Thread Beaulieu, Jake
Hi, I would like to include the greek letter mu, in italics, in an axis title. The following gets close, but the mu isn't italicized. x - 1:10 y - 1:10 plot(y ~x, ylab = expression(paste('Greek ', italic(mu Anybody know how to accomplish this? Thanks, Jake

Re: [R] Interpreting lmp() results

2013-08-20 Thread Ann Marie Reinhold
Thanks, Bert. Perhaps it would serve me to be more direct and concise. Why am I unable to replicate lm() results using lmp() when the documentation indicates that the results should be the same when perm=, seqs=TRUE, center=FALSE? Some of the estimates are different. In addition, the standard

[R] rcode problem

2013-08-20 Thread Garkuwa, Nuru Adamu
Hi, Please find attached rcode and my data.There seems to be a problem in the following rcodes: plot(diet~class.f, data=nuru) points(pred.mod1~midpoints,type=b) please I need your help. Kind Regards, Nuru Species Fish ID DateTimeDepth (m) Haul.No.Longitude

[R] Generating random values from zero inflated negative binomial distribution with rZINBI {gamlss.dist}

2013-08-20 Thread flavie.vial
Good afternoon, I have two years of count data (daily time-series data). My Y variable can be modeled using a ZINB model with day of the week and month effects (both x variables retained in the logistic and negative binomial part of the model). Now I would like to simulate 100 years of count

Re: [R] Weighted SUR/NSUR

2013-08-20 Thread Arne Henningsen
Dear Ariel Thank you for your detailed explanations and the example. Indeed, it should be rather straightforward to implement observation-specific weights in systemfit (i.e. in the estimation of systems of linear or non-linear equations). As you indicated that many people are looking for this

Re: [R] rcode problem

2013-08-20 Thread arun
HI, nuru- read.table(NS.diet.txt,header=TRUE,stringsAsFactors=FALSE,sep=\t,fill=TRUE,check.names=FALSE) colnames(nuru) # [1] Species   Fish ID   Date  #[4] Time  Depth (m) Haul.No.  #[7] Longitude

[R] Problems about nonparametric regression with multivariate dependent variables

2013-08-20 Thread Ying Zheng
My problem is to evaluate several conditional moments nonparametrically. That is to evaluate E(y|x=x_0) and Var(y|x=x_0) with y a 2x1 variable. I have tried several commands in np package, like npregbw. I cannot find a command that can apply to the case with multivariate dependent variables,

[R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Ye Lin
Hey All, I wanna to fit a model y~x/(a+x) to my data, here is the code I use now: lm((1/y-1)~I(1/x)+0, data=b) and it will return the coefficient which is value of a however, if I use the code above, I am not able to draw a curve the presents this equation. How can I do this? Thanks for your

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread David Carlson
?curve set.seed(42) x - 1:15 y - x/(1+x)+rnorm(15, 0, .02) plot(y~x) lm.out - lm((1/y-1)~I(1/x)+0) curve(x/(coef(lm.out)+x), 1, 15, add=TRUE) - David L Carlson Associate Professor of Anthropology Texas AM University College Station, TX 77840-4352

Re: [R] How to apply a function to every element of a dataframe, when the function uses for each colummn and row different values to calculate with?

2013-08-20 Thread David Winsemius
PLEASE do not crosspost to Rhelp and googlegroups. (removed that address.) On Aug 20, 2013, at 9:43 AM, Jacqueline Oehri wrote: Dear R users I have a question concerning applying a function to each element of a dataframe: 1) -- I have a dataframe like this: d: (columnames: names

Re: [R] italic(mu)

2013-08-20 Thread David Winsemius
On Aug 20, 2013, at 12:06 PM, Beaulieu, Jake wrote: Hi, I would like to include the greek letter mu, in italics, in an axis title. The following gets close, but the mu isn't italicized. x - 1:10 y - 1:10 plot(y ~x, ylab = expression(paste('Greek ', italic(mu The Symbol font

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Rolf Turner
(1) It is not acceptable to use wanna in written English. You should say I want to fit a model . (2) The model you have fitted is *not* equivalent to the model you first state. If you write y ~ x/(a+x) you are tacitly implying that y = x/(a+x) + E where the errors E are

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Ye Lin
T hanks for your insights Rolf! The model I want to fit is y=x/a+x with no intercept, so I transformed it to 1/y=1+a/x as they are the same. but i will look up nls() and see how to fit the model without transformation. On Tue, Aug 20, 2013 at 2:45 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote:

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Rolf Turner
On 21/08/13 11:23, Ye Lin wrote: T hanks for your insights Rolf! The model I want to fit is y=x/a+x with no intercept, so I transformed it to 1/y=1+a/x as they are the same. For crying out loud, they are ***NOT*** the same. The equations y = x/(a+x) and 1/y = 1 + a/x are indeed

Re: [R] ave function

2013-08-20 Thread Robert Lynch
I tried lapply(split(Clean,list(Clean$TERM,Clean$INST_NUM)),function(x) shapiro.test(x$GRADE)) and I got Error in shapiro.test(x$GRADE.) : sample size must be between 3 and 5000 I also tried with(Clean, aggregate(GRADE,list(TERM,INST_NUM),FUN=shapiro.test)) and got Group.1 Group.2 x

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-20 Thread Bert Gunter
Rolf: Thanks for this. It nicely illustrates what to me is a fundamental problem: For many scientists, it is not math (stats) that is the stumbling block, but rather the failure to understand how variability (noise) affects the experimental/observational process. One does tend to get more

[R] alignment problem for italicised legend text in pdf output from a barplot

2013-08-20 Thread Nixon, John
A minimal R source code file producing this is: data=c(1,2) pdf(file=error.pdf) barplot(data) legend(1.5,c(expression(italic(C.sativa),italic(B.rapa))),horiz=TRUE) dev.off() The problem is that the two italicised strings are not aligned in the pdf output, with the string on the left being lower

Re: [R] alignment problem for italicised legend text in pdf output from a barplot

2013-08-20 Thread David Winsemius
On Aug 20, 2013, at 2:28 PM, Nixon, John wrote: A minimal R source code file producing this is: data=c(1,2) pdf(file=error.pdf) barplot(data) legend(1.5,c(expression(italic(C.sativa),italic(B.rapa))),horiz=TRUE) dev.off() The problem is that the two italicised strings are not aligned

Re: [R] ave function

2013-08-20 Thread arun
HI, I guess your original dataset would have some list elements as empty. Clean- structure(list(GRADE = c(1, 2, 3, 1.5, 1.75, 2, 0.5, 2, 3.5, 3.5, 3.75, 4), TERM = c(9L, 9L, 9L, 8L, 8L, 8L, 9L, 9L, 9L, 8L, 8L, 8L), INST_NUM = c(1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L)), .Names =

Re: [R] italic(mu)

2013-08-20 Thread Pascal Oettli
Hello, You may find hints in the following thread: https://stat.ethz.ch/pipermail/r-help/2011-June/281493.html Regards, Pascal 2013/8/21 Beaulieu, Jake beaulieu.j...@epa.gov Hi, I would like to include the greek letter mu, in italics, in an axis title. The following gets close, but the