Re: [R] suggestions argument in rbga function in genalg package

2011-09-22 Thread Enrico Schumann
I do not use this package, but a quick look at the code shows this. if (!is.null(suggestions)) { # [deleted] suggestionCount = dim(suggestions)[1] So 'suggestions' needs to have a dim argument (while the documentation speaks of an 'optional list of suggested chromosomes'). You could try

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Joshua Wiley
Hi Tal, Just another note, I recently joined the R2HTML team. I am still slogging through the Sweave code trying to understand it better, but in the coming months I will be working on implementing more of the features in R's RweaveLatex() driver for HTML. This will not precisely help a LaTeX to

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread baptiste auguie
Have you tried asciidoc (ascii package)? It seems like a good fit for your needs. baptiste On 23 September 2011 11:09, Tal Galili wrote: > Hello dear R help members, > I have found several references on how to do this, my question is if anyone > is actually using them - and if there are some s

[R] p values in coxph()

2011-09-22 Thread Brian Tsai
Hi, I'm interested in building a Cox PH model for survival modeling, using 2 covariates (x1 and x2). x1 represents a 'baseline' covariate, whereas x2 represents a 'new' covariate, and my goal is to figure out where x2 adds significant predictive information over x1. Ideally, I could get a p-val

Re: [R] Plot map by region using kasc and adehabitat

2011-09-22 Thread Alex Olssen
Hi there, I thought it would be useful to answer my own question for anybody else searching Google. An easy way to split a national map into smaller maps at lower levels of aggregation is to use the function mask() in the package raster Alex On 21 September 2011 19:20, Paul Hiemstra wrote: >  

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Michael Hannon
> I have found several references on how to do this, my question is if anyone > is actually using them - and if there are some strong points on what to use, > and how well it is working out. > My goal is to be able to easily create docs from R, but to be able to share > it with other researchers (

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
Paul I tested your suggestion of use the BIGLM package. With this package, model run with out any problem. regards 2011/9/22 David Winsemius > > On Sep 22, 2011, at 5:00 PM, Mario Montecinos Carvajal wrote: > > Michale and Paul >> >> Thanks for your quick response. >> >> Michael, I am runnin

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Duncan Murdoch
On 11-09-22 8:38 PM, Abhijit Dasgupta wrote: So, I was playing around a bit on my Mac LyX can do Sweave (see http://wiki.lyx.org/LyX/LyxWithRThroughSweave), and will actually output HTML or ODT. However, on a cursory pass, I couldn't get the graphics to translate, > since the Sweave driv

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
David Thanks for the time that you spent in read and understand my mail, as well as for your response and recomendations. I apologize if my attempt to put comment in my code, not was enought. I appreciate a lot your suggestion and I will take care of change the variable name "length" for avoid co

[R] Adding weights to optim

2011-09-22 Thread Ahnate Lim
I realize this may be more of a math question. I have the following optim: optim(c(0.0,1.0),logis.op,x=d1_all$SOA,y=as.numeric(md1[,i])) which uses the following function: logis.op <- function(p,x,y) { ypred <- 1.0 / (1.0 + exp((p[1] - x) / p[2])); res <- sum((y-ypred)^2) return(res) }

[R] Correlation of variables with repeated measures.

2011-09-22 Thread Heverkuhn Heverkuhn
Hello I have a dataframe that looks like this: Date Min Subj VAR1 VAR2 VAR3 1 8/30/2011 5min1 34.41042 126.08490 55.3548387 2 8/30/2011 10min1 34.53030 133.81343 61.600 3 8/30/2011 15min1 34.66297 118.38193 11.800 4 8/30/2011 20min1 34.82770 1

Re: [R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Abhijit Dasgupta
So, I was playing around a bit on my Mac LyX can do Sweave (see http://wiki.lyx.org/LyX/LyxWithRThroughSweave), and will actually output HTML or ODT. However, on a cursory pass, I couldn't get the graphics to translate, since the Sweave driver translates the graphics as .ps or .pdf files,

Re: [R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread Dennis Murphy
I don't see the problem. AFAICT, you want plots of quant vs. sampdate by chemicals for each of the 37 streams. Essentially, you seem to want two superimposed time plots in each panel. A time plot is a scatterplot with a time-ordered (usually horizontal) axis. If you use ggplot2 or lattice to gener

Re: [R] Identifying Package for Function

2011-09-22 Thread Rich Shepard
On Fri, 23 Sep 2011, Michael Sumner wrote: Do you perhaps mean ?droplevels, as mentioned in See Also of subset help? Yep. Mis-translation between the help page and the working page. Mea culpa! Rich __ R-help@r-project.org mailing list https://st

Re: [R] Limitations of audio processing in R

2011-09-22 Thread Spencer Graves
Hi, Michael & Ulisses: ULISSES: If you haven't already, I suggest you look at the hexView package including the R News article cited below and the readRaw function in particular. I just used readRaw(filename, offset=4, nbytes=8) to read bytes 5:12 in filename; in this case, filename was *

Re: [R] Identifying Package for Function

2011-09-22 Thread B77S
Where is dropvalue(s) mentioned? > ?subset subset: logical expression indicating elements or rows to keep: missing values are taken as false. select: expression, indicating columns to select from a data frame. drop: passed on to ‘[’ indexing operator. ...: further arg

Re: [R] Identifying Package for Function

2011-09-22 Thread Michael Sumner
Do you perhaps mean ?droplevels, as mentioned in See Also of subset help? Otherwise, where exactly do you see 'dropvalues' referred to? Cheers, Mike. On Fri, Sep 23, 2011 at 9:08 AM, Rich Shepard wrote: >  While reading ?subset I'm referred to learn about dropvalues() as a > following operation

Re: [R] Limitations of audio processing in R

2011-09-22 Thread Jeff Newmiller
1) I don't know about automated clipping using Audacity. 2) en.wiktionary.org/wiki/for_the_win --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer

[R] How to turn a LaTeX Sweave file (Rnw) into .HTML/.odf/.docx? (under windows)

2011-09-22 Thread Tal Galili
Hello dear R help members, I have found several references on how to do this, my question is if anyone is actually using them - and if there are some strong points on what to use, and how well it is working out. My goal is to be able to easily create docs from R, but to be able to share it with ot

[R] Identifying Package for Function

2011-09-22 Thread Rich Shepard
While reading ?subset I'm referred to learn about dropvalues() as a following operation. Yet, when I issue ?dropvalue I see, "No documentation for '?dropvalues' in specified packages and libraries:". How do I identify the library/package that contains a specific function such as, in this case

Re: [R] Limitations of audio processing in R

2011-09-22 Thread Spencer Graves
Hi, Carl: 1. I've used Audacity and it seemed fine -- though I haven't used it much. 2. What's FTW? (None of the Wikipedia disambiguation entries seemed to fit.) Thanks, Spencer On 9/22/2011 2:41 PM, Carl Witthoft wrote: With all due respect to those of us (i

Re: [R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread Rich Shepard
On Thu, 22 Sep 2011, David Winsemius wrote: Scatterplots are for two variables with continuous valued data. You are asking about one such variable, apparently within some combination of groups of discrete variables. Look at dotplot or bwplot examples. David, Good catch. Point noted. Thank

Re: [R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread Rich Shepard
On Thu, 22 Sep 2011, Dennis Murphy wrote: Question: Do you want 37 different panels with plots of quant vs. date by param, or two panels (one per chemical) with all 37 streams? If you only want two of the eight chemicals, Dennis, I want only 2 chemicals per plot. I'd suggest using subset(

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread David Winsemius
On Sep 22, 2011, at 5:00 PM, Mario Montecinos Carvajal wrote: Michale and Paul Thanks for your quick response. Michael, I am running a 32bit version of R sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 Paul, the dimension of the Data Frame with I am workis is dim(d) [1] 7017

[R] (sin asunto)

2011-09-22 Thread Ruth Arias
hello, I want to  know as mortality in different families of epiphytes after selective logging in the forest I want to make a survival analysis with left and right censored data.  My study begins in 2004 but I have many individuals who enter the study in 2007 I have tried this:                  

Re: [R] create variables through a loop

2011-09-22 Thread Changbin Du
HI, Dennis, Thanks for the helps! All roads to Rome, appreciated! On Thu, Sep 22, 2011 at 2:54 PM, Dennis Murphy wrote: > Hi: > > Here's one approach with package reshape2. I copied the same data > frame 10 times to illustrate the idea, but as long as your data frames > have the same structur

Re: [R] Error: cannot allocate vector of size xxx

2011-09-22 Thread Mario Montecinos Carvajal
Michale and Paul Thanks for your quick response. Michael, I am running a 32bit version of R > sessionInfo() R version 2.11.1 (2010-05-31) i386-pc-mingw32 Paul, the dimension of the Data Frame with I am workis is dim(d) > [1] 7017411 And the size of the file that contains the data is 2946

[R] How to do Multiple Comparisons for a Mixed Effects Model

2011-09-22 Thread Allan Carson
Hello everyone I am currently trying to conduct analysis of my graduate thesis data using a mixed effects model and I have reached an impass. When I try to conduct a multiple comparison, I get an error (See below): > fm3<- lme(abovegroundbiomass.m.2~medium*amelioration*fertilizer*treatment, ra

Re: [R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread David Winsemius
On Sep 22, 2011, at 6:03 PM, Rich Shepard wrote: Data frame has this structure: 'data.frame': 11169 obs. of 4 variables: $ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "1987-07-23" "1987-09-17" ... $ param : Factor w/ 8 levels "As",

Re: [R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread Dennis Murphy
Hi: Question: Do you want 37 different panels with plots of quant vs. date by param, or two panels (one per chemical) with all 37 streams? If you only want two of the eight chemicals, I'd suggest using subset() to select out the pair you want and then redefine the param factor so that the subset d

[R] Bivariate Scatter Plots with Lattice

2011-09-22 Thread Rich Shepard
Data frame has this structure: 'data.frame': 11169 obs. of 4 variables: $ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "1987-07-23" "1987-09-17" ... $ param : Factor w/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ... $ quant :

Re: [R] create variables through a loop

2011-09-22 Thread Dennis Murphy
Hi: Here's one approach with package reshape2. I copied the same data frame 10 times to illustrate the idea, but as long as your data frames have the same structure (same variables, same dimension), this should work. library('plyr') library('reshape2') # Use your example data as the template: ds

Re: [R] Limitations of audio processing in R

2011-09-22 Thread Carl Witthoft
With all due respect to those of us (including me) who love R, when it comes to audio processing w/ freeware, Audacity FTW. 'nuff said Carl -- - Sent from my Cray XK6 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] How make a x,y dataset from a formula based entry

2011-09-22 Thread Jean-Christophe BOUËTTÉ
Hello, You can check ?model.frame. I do not know however to extract only the right-hand of left-hand part of a formula. JC 2011/9/22 trekvana : > Hello all, > > So I am using the (formula entry) method for randomForests: > > randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that som

[R] How make a x,y dataset from a formula based entry

2011-09-22 Thread trekvana
Hello all, So I am using the (formula entry) method for randomForests: randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that some of the items in that package dont take a formula entry - you have to explicitly state the y and x vector: randomForest(x=xxx[,c('x1','x2',...,'x40')],

Re: [R] solving linear equations

2011-09-22 Thread varunshivashankar
Hi Bolker, Sorry for the late reply and thank you very much. The code works fine. I am indeed sorry for telling you it was a linear equation. I am just trying to use the R code to perform the curve fitting problem for the team of biologists. The data given to me was a sample data and they told me

Re: [R] Quelplot

2011-09-22 Thread Goldberg, Ken [JRDUS]
Hi Hadley, Thank-you for your interest in the quelplot. I agree that Rand Wilcox only published relplot code. I do not know of any other R or S implementations. I wrote all of my code in HTBasic (Rocky Mountain BASIC) originally. I later copied some of it to SAS proc iml, but I think that was j

Re: [R] Proportions of a vector

2011-09-22 Thread R. Michael Weylandt
Try this: long.prop.table <- function(x) { x <- as.factor(x) p = tabulate(x)/length(x) p[x] } Michael Weylandt On Thu, Sep 22, 2011 at 3:41 PM, Jim Silverton wrote: > > > > Hi all, > > I have a vector xm say: xm = c(1,2,3,4,5,5,5,6,6) > > > > I want to return a vector with the corr

Re: [R] Proportions of a vector

2011-09-22 Thread Sarah Goslee
If the values in xm are always going to be consecutive integers 1:n, then this: > prob.xm[xm] xm 1 2 3 4 5 5 5 6 6 0.111 0.111 0.111 0.111 0.333 0.333 0.333 0.222 0.222 otherwise: > prob.xm[as.numeric(as.factor(xm))] xm 1 2 3 4 5 5

Re: [R] Proportions of a vector

2011-09-22 Thread Jim Silverton
> > Hi all, > I have a vector xm say: xm = c(1,2,3,4,5,5,5,6,6) > > I want to return a vector with the corresponding probabilities based on the > amount of times the numbers occurred. For example, I should get the > following vector for xm: > prob.xm = c(1/9, 1/9, 1/9, 1/9, 3/9, 3/9, 3/9, 2/9, 2/9

Re: [R] Quelplot

2011-09-22 Thread Michael Friendly
On 9/21/2011 3:11 PM, Hadley Wickham wrote: Hi all, Does anyone have an R implementation of the queplot (K. M. Goldberg and B. Iglewicz. Bivariate extensions of the boxplot. Technometrics, 34(3):pp. 307–320, 1992)? I'm struggling with the estimation of the asymmetry parameters. Do you have so

[R] suggestions argument in rbga function in genalg package

2011-09-22 Thread Joseph Boyer
Would someone be so kind as to provide example code where they use the suggestions argument in the rgba function In genalg? I can't get it to work. The following code works just fine: GenFit <-rbga(Lower, Upper, evalFunc = evaluate) Lower and Upper are each numeric vectors with 7 elements. Eva

Re: [R] create variables through a loop

2011-09-22 Thread David Winsemius
On Sep 22, 2011, at 2:06 PM, Changbin Du wrote: HI, Michael, The following codes are great! first.out <- do.call("cbind", list(first, result.fun)) Would this have been easier? > dat[ , c(1:3, rep(4, 5))] probe_name chr_id position array1 array1.1 array1.2 array1.3 1C-7SARK 1 8

Re: [R] create variables through a loop

2011-09-22 Thread Changbin Du
HI, Michael, The following codes are great! first.out <- do.call("cbind", list(first, result.fun)) colnames(first.out) <- c(colnames(first), paste("array", seq(length(result.fun)), sep="")) > head(first.out) probe_name chr_id position array1 array2 array3 array4 array5 array6 array7 1C-7S

Re: [R] create variables through a loop

2011-09-22 Thread Changbin Du
Thank, Jean, appreciated your help! On Thu, Sep 22, 2011 at 10:52 AM, Jean-Christophe BOUËTTÉ < jcboue...@gmail.com> wrote: > Hi, > It's hard to provide you with working code when you don't provide a > reproducible example, but do you really need to create variables? What > about (untested): > >

Re: [R] Quelplot

2011-09-22 Thread Hadley Wickham
Thanks Rich - unfortunately, as far as I can, tell Rand Wilcox only developed relplot code. Hadley On Thu, Sep 22, 2011 at 12:52 PM, Richard M. Heiberger wrote: > Hadley, > > I forwarded your request to Boris and Ken.  Here is Boris' response. > > Rich > > > Dear Richard: > >    I looked a bit mo

Re: [R] create variables through a loop

2011-09-22 Thread Changbin Du
Thanks so much, Michael! head(first) probe_name chr_id position array1 1C-7SARK 1 849467 10 2C-4WYLN 1 854278 10 3C-3BFNY 1 854471 10 4C-7ONNE 1 874460 10 5C-6HYCN 1 874571 10 6C-7SCGC 1 874609 10 for( i i

Re: [R] create variables through a loop

2011-09-22 Thread Jean-Christophe BOUËTTÉ
On how to use named vs. positional arguments, you can also have a look at section 2.3 of "an introduction to R". 2011/9/22 Jean-Christophe BOUËTTÉ : > Hi, > It's hard to provide you with working code when you don't provide a > reproducible example, but do you really need to create variables? What

Re: [R] create variables through a loop

2011-09-22 Thread Jean-Christophe BOUËTTÉ
Hi, It's hard to provide you with working code when you don't provide a reproducible example, but do you really need to create variables? What about (untested): for (i in 1:2) { first <-cbind(first, result.fun[[i]]) } you will then have to look at names(first) and change the last part of it to

Re: [R] Quelplot

2011-09-22 Thread Richard M. Heiberger
Hadley, I forwarded your request to Boris and Ken. Here is Boris' response. Rich Dear Richard: I looked a bit more and found the second edition of book referenced, Rand R Wilcox, "Introduction to Robust Estimation and Hypothesis Testing," Second Edition, Academic Press, 2005. It has over 6

[R] Problem with error message in Rcmdr

2011-09-22 Thread Beaulieu . Jake
Hello, I just upgraded to R version 2.13.1 and am running Rcmdr version 1.7-0. Prior to the upgrade, Rcmdr returned descriptive error messages. However, since the upgrade the only error message Rcmdr supplies is: ERROR: How can I convince Rcmdr to return useful error messages again? Thanks,

Re: [R] create variables through a loop

2011-09-22 Thread R. Michael Weylandt
Actually, I think you can make that even easier: first.out <- cbind(first, result.fun) Michael Weylandt On Thu, Sep 22, 2011 at 1:37 PM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > There are a few ways to proceed from here. If you are really committed to > this loop + assign idea

Re: [R] create variables through a loop

2011-09-22 Thread R. Michael Weylandt
There are a few ways to proceed from here. If you are really committed to this loop + assign idea, I'd provide the following code: for( i in 2:3) { label <- paste("array", i, sep="") assign(label, value = result.fun[[i-1]] ) first <- cbind(first, get(label)) } However, this is general

[R] Wrapper of linearHypothesis (car) for post-hoc of repeated measures ANOVA

2011-09-22 Thread Helios de Rosario
For some time I have been looking for a convenient way of performing post-hoc analysis to Repeated Measures ANOVA, that would be acceptable if sphericity is violated (i.e. leaving aside post-hoc to lme models). The best solution I found was John Fox's proposal to similar requests in R-help: http:/

Re: [R] create variables through a loop

2011-09-22 Thread Changbin Du
HI, Michael, I tried use x and got the following: > for (i in 2:3) { + + assign(x=paste("array", i, sep=""), value=result.fun[[i-1]]) + + first <-cbind(first, x) + + } *Error in cbind(first, x) : object 'x' not found * But I checked the ls() "array2" "array3"were created. Can I

Re: [R] create variables through a loop

2011-09-22 Thread R. Michael Weylandt
There is no "lab=" argument for assign() hence the error. Did someone provide you with example code that suggested such a thing? remove lab= entirely or replace it with x= to make your code work. More generally type ?assign or args(assign) to see what the arguments for a function are. More general

[R] create variables through a loop

2011-09-22 Thread Changbin Du
HI, Dear R community, I am trying to created new variables and put into a data frame through a loop. My original data set: head(first) probe_name chr_id position array1 1C-7SARK 1 849467 10 2C-4WYLN 1 854278 10 3C-3BFNY 1 854471 10 4C-7ONNE

Re: [R] R.oo: do work on data member at construction

2011-09-22 Thread Ben qant
Thank you very much! I'm using the first example. For others: there are two simple typos in Henrik's email below: pretty sure y <- this$.; should be y <- this$.y; Thanks again... Corrected below... Ben > Hello, > > I'd like to 'do work' on data members upon construction (i.e. without > imple

Re: [R] need help on melt/cast

2011-09-22 Thread David Winsemius
On Sep 22, 2011, at 12:28 PM, John Kane wrote: And I always have a problem with reshape(). Me too. Mind you I often have similar problems with melt() Many fewer, though. Anyway with the data.frame xx, try melt(xx, id=c("ID")) Just newdf <- melt(xx) # would have succeeded here.

Re: [R] need help on melt/cast

2011-09-22 Thread John Kane
And I always have a problem with reshape(). Mind you I often have similar problems with melt() Anyway with the data.frame xx, try melt(xx, id=c("ID")) --- On Thu, 9/22/11, Uwe Ligges wrote: > From: Uwe Ligges > Subject: Re: [R] need help on melt/cast > To: "Eugene Kanshin" > Cc: r-help@r

Re: [R] ARIMA - Skipping intermediate lags

2011-09-22 Thread Bogaso Christofer
Dear Prof. Repley, may I know in details why ignoring intermediate lags are sin? How the statistical properties will be worse than not ignoring them? If I am correct then, ignoring some parameters means we know the population values for them. Therefore in this case, my MSE estimate should be smalle

Re: [R] R.oo: do work on data member at construction

2011-09-22 Thread Henrik Bengtsson
On Thu, Sep 22, 2011 at 9:06 AM, Ben qant wrote: > Hello, > > I'd like to 'do work' on data members upon construction (i.e. without > implementing it in a get method). Is this the best way to create data member > 'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex > I'll r

Re: [R] How to adjust the y-axis range in barplot properly

2011-09-22 Thread Luke Miller
This should do the trick: barplot(data, ylim=c(60,90), beside=TRUE, xpd = FALSE) As usual, check ?barplot first for clues on how to customize the plot to your specifications. On Thu, Sep 22, 2011 at 11:49 AM, Benedikt Drosse wrote: > > Hello R-Users, > it might be a rather simple problem I have

Re: [R] Problems with as.POSIXct

2011-09-22 Thread Prof Brian Ripley
What timezone is this? In America/Bogota there was no midnight that day, so the time would be invalid. The Olson database has # Colombia # Rule NAMEFROMTO TYPEIN ON AT SAVELETTER/S RuleCO 1992only- May 3 0:001:00S R

[R] image.plot for non-regular grid: round pixel

2011-09-22 Thread Sebastian Schubert
Hi, I am very new to R so I hope this is not stupid. Here a small example: (I use R version 2.13.1) library("fields") ## round pixel x=matrix(1:100,ncol=10) y=matrix(1:100,ncol=10) for(i in 1:10){ x[i,] <- 1:10 + i y[i,] <- 1:10 + i/20 } #x=1:10 #y=1:10 z=matrix(1:

[R] How to adjust the y-axis range in barplot properly

2011-09-22 Thread Benedikt Drosse
Hello R-Users, it might be a rather simple problem I have, but I couldn't find any solution online. Thus, here is my problem: I would like to adjust the y-axis range in a barplot, since all my values are >70. Therefore I would like to only visualize the y-axis from 60-100 (example 1). The pro

Re: [R] Problems with as.POSIXct

2011-09-22 Thread William Dunlap
Didn't Columbia switch to a year of daylight savings time at what would have been midnight May 3, 1992 (so midnight did not exist that day)? Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.o

[R] corrigendum on fixed effects and R2 in within models

2011-09-22 Thread Millo Giovanni
Dear list, dear Cecilia and Daniel, sorry for coming in ten days late, I've been very busy lately so I came across this email only today. This is just to make some points clearer re: fixed effects and r2 in package 'plm', to both you and the list. In particular, to make you aware of some addition

[R] R.oo: do work on data member at construction

2011-09-22 Thread Ben qant
Hello, I'd like to 'do work' on data members upon construction (i.e. without implementing it in a get method). Is this the best way to create data member 'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex I'll run into issues. setConstructorS3("MyClass", function(x=NA,y=

[R] Problems with as.POSIXct

2011-09-22 Thread KENNETH R CABRERA
Hi R users: This is a very strange problem: Why this instruction shows me NA?, and any other date shows me that error! as.POSIXct(strptime("1992-5-3",format="%Y-%m-%d")) This is my R version on windows 7. "R version 2.13.1 Patched (2011-08-25 r56794)" Thank you for your help. ___

Re: [R] nlm's Hessian update method

2011-09-22 Thread John C Nash
BFGS is actually Fletcher's (1970) variable metric code that I modified with him in January 1976 in Dundee and then modified very, very slightly (to insist that termination only occurred on a steepest descent search -- this messes up the approximated inverse Hessian, but I have an experimental R

Re: [R] the opposite of lag() in panel data

2011-09-22 Thread Cecilia Carmo
Yes, I want to it with plm package for panel data in dataframes. Thank you, Cecília Carmo De: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Enviada: quinta-feira, 22 de Setembro de 2011 16:06 Para: Cecilia Carmo Cc: r-help@r-project.org Assunto: Re: [R] the opposite of lag()

[R] NLS- check convergence

2011-09-22 Thread Diviya Smith
Hi there, I am having some trouble with NLS convergence for my function. I was wondering if there is a way to check the value of the indicator function for all the iterations to look at the surface of the likelihood function. Any help would be most appreciated. Thanks, Diviya [[alternat

Re: [R] negative binomial GAMM with variance structures

2011-09-22 Thread Simon Wood
gamm can't estimate the theta parameter for a negative binomial automatically. It can only work with fixed user supplied values for theta (i.e. negbin(2.3) should work, but negbin(c(1,10)) won't). Is negative binomial the only thing you can use here (it doesn't seem like the most natural choice

Re: [R] the opposite of lag() in panel data

2011-09-22 Thread R. Michael Weylandt
Is there perhaps a particular package you are interested in here? I'm not aware of a "pdata.frame" function... This certainly works with the xts class. If you just mean a regular data.frame() perhaps some of the ideas in this old thread will work with a little tweaking: http://www.mail-archive.com/

[R] the opposite of lag() in panel data

2011-09-22 Thread Cecilia Carmo
Hi R-helpers I want a function that performs the opposite of lag() with panel data. I have transformed my data before with pdata.frame(mydata, index=c("groupindex", “timeindex")) And then I’ve done lag(mydata, -1) but it doesn’t work. The error message was: Error in rep(1, ak) : invalid

Re: [R] need help on melt/cast

2011-09-22 Thread Uwe Ligges
I can never remember what melt, cast and all that means, hence I simpy use reshape() which does not even require any additional package: reshape(dat, direction="long", idvar = "ID", varying=list(2:4), v.names="Value", times=names(dat)[2:4]) Uwe Ligges On 22.09.2011 15:54, Eugene Kanshin wro

Re: [R] Header auslesen und bei Regression verwenden

2011-09-22 Thread Jeff Newmiller
If you explicitly convert your categorical covariates to factors before you regress, you can use the dot notation (see help on lm) to refer to "the rest" of the columns not otherwise specified in your formula. --- Jeff Newmil

Re: [R] need help on melt/cast

2011-09-22 Thread Dimitris Rizopoulos
You can use function reshape(), e.g., DF <- data.frame(ID = LETTERS[1:3], T0 = c(1,4,7), T1 = c(2,5,8), T2 = c(3,6,9)) DF.new <- reshape(DF, idvar = "ID", direction = "long", varying = list(2:4), times = names(DF[-1])) DF.new DF.new[order(DF.new$ID), ] I hope it helps. Best, Dimitris

Re: [R] Re-installing R

2011-09-22 Thread Uwe Ligges
On 22.09.2011 14:47, Andrey A wrote: Dear R users How does one completely uninstall R from their machine? Going to control panel>programs does not do it for me. After installing the new version it will still remember my previous workspace and all packages I've installed. This seems to be Wind

Re: [R] need help on melt/cast

2011-09-22 Thread Doran, Harold
?reshape From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Eugene Kanshin [kanshin...@gmail.com] Sent: Thursday, September 22, 2011 9:54 AM To: r-help@r-project.org Subject: [R] need help on melt/cast Hello, I need to convert d

Re: [R] Re-installing R

2011-09-22 Thread R. Michael Weylandt
You need to uninstall packages directly (they are kept independently of R, which is actually quite helpful when updating so you don't have to get them all anew): this can be done within R by combining remove.packages() and installed.packages(). To delete the workspace you need to manually remove th

[R] negative binomial GAMM with variance structures

2011-09-22 Thread Meredith Jantzen
Hello, I am having some difficulty converting my gam code to a correct gamm code, and I'm really hoping someone will be able to help me. I was previously using this script for my overdispersed gam data: M30 <-gam(efuscus~s(mic, k=7) +temp +s(date)+s(For3k, k=7) + pressure+ humidity, fam

Re: [R] Subsetting a zooreg object using window / subset

2011-09-22 Thread Wesley Roberts
Many thanks Gabor, That is exactly what I needed. Regards, W. >>> Gabor Grothendieck 22/09/2011 13:52 >>> On Thu, Sep 22, 2011 at 6:48 AM, Wesley Roberts wrote: > Dear R users, > > > I am currently working in subsetting a zooreg() object using either window or > subset. I have a solution but

[R] need help on melt/cast

2011-09-22 Thread Eugene Kanshin
Hello, I need to convert dataframe from: ID T0 T1 T2 A1 2 3 B4 5 6 C7 8 9 to: ID Variable Value A T0 1 A T1 2 A T2 3 B T0 4 B T1 5 B T2 6 C T0 7 C T1 8 C

[R] Header auslesen und bei Regression verwenden

2011-09-22 Thread BiGBeN76
Hi. First, a little preliminary observation: in this thread, it is indeed a (multiple linear) regression model, the real problem is but my opinion on general questions about R assign. So as I said, I want to do a regression analysis, however, for several target variables or data tables. This ca

[R] Re-installing R

2011-09-22 Thread Andrey A
Dear R users How does one completely uninstall R from their machine? Going to control panel>programs does not do it for me. After installing the new version it will still remember my previous workspace and all packages I've installed. Thank you. [[alternative HTML version deleted]] __

Re: [R] help in interpreting paired t-test

2011-09-22 Thread peter dalgaard
On Sep 21, 2011, at 18:39 , Marc Schwartz wrote: > Jeremy, > > Correlation alone is irrelevant when comparing two separate sets of > measurements on the same specimen. Correlation does not mean good agreement, > but good agreement tends to infer high correlation. Marc, I think Jeremy is well

Re: [R] help in interpreting paired t-test

2011-09-22 Thread S Ellison
Late, I know, but if method comparison id the interest, the methcomp package on CRAN does Bland-Altman plots and passing-Bablock regression, both clinical chemistry staples for method comparison. S Ellison > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun.

[R] Error in as.vector(data) optim() / fkf()

2011-09-22 Thread Kristian Lind
Dear R users, When running the program below I receive the following error message: fit <- optim(parm, objective, yt = tyield, hessian = TRUE) Error in as.vector(data) : no method for coercing this S4 class to a vector I can't figure out what the problem is exactly. I imagine that it has someth

Re: [R] Subsetting a zooreg object using window / subset

2011-09-22 Thread Achim Zeileis
On Thu, 22 Sep 2011, Gabor Grothendieck wrote: On Thu, Sep 22, 2011 at 6:48 AM, Wesley Roberts wrote: Dear R users, I am currently working in subsetting a zooreg() object using either window or subset. I have a solution but it may be a bit cumbersome when I start working with actual data.

Re: [R] Reading data in lisp format

2011-09-22 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/09/11 10:13, ESTEBAN ALFARO CORTES wrote: > Thanks David, > > The crx.data is a different database and I would like to use both. > I have contacted with the developer but he has not answered me. I would suggest talk to folks using emacs, as ema

Re: [R] Subsetting a zooreg object using window / subset

2011-09-22 Thread Gabor Grothendieck
On Thu, Sep 22, 2011 at 6:48 AM, Wesley Roberts wrote: > Dear R users, > > > I am currently working in subsetting a zooreg() object using either window or > subset. I have a solution but it may be a bit cumbersome when I start working > with actual data. Your inputs would be greatly appreciated.

[R] Suggest workshops/short course in R programming

2011-09-22 Thread pallavi dhage
Hi Interested in learning  R programming via workshop/short course in India. Request all to suggest any. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

[R] Subsetting a zooreg object using window / subset

2011-09-22 Thread Wesley Roberts
Dear R users, I am currently working in subsetting a zooreg() object using either window or subset. I have a solution but it may be a bit cumbersome when I start working with actual data. Your inputs would be greatly appreciated. Example: I have a zooreg() object that starts in 1997 and ends i

Re: [R] Reading data in lisp format

2011-09-22 Thread ESTEBAN ALFARO CORTES
Thanks Cesar, Any idea for this contents of the file? ;; positive examples represent people that were granted credit (def-pred credit_screening :type (:person) :pos ((s1) (s2) (s4) (s5) (s6) (s7) (s8) (s9) (s14) (s15) (s17) (s18) (s19) (s21) (s22) (s24) (s28) (s29) (s31) (s32) (s3

Re: [R] R-help Digest, Vol 103, Issue 21

2011-09-22 Thread mihalicza . peter
Szeptember 12-től 26-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 12 till 26 September with no access to my emails. In urgent cases please contact

Re: [R] Reading data in lisp format

2011-09-22 Thread ESTEBAN ALFARO CORTES
Thanks David, The crx.data is a different database and I would like to use both. I have contacted with the developer but he has not answered me. Regards, Esteban De: David Winsemius [mailto:dwinsem...@comcast.net] Enviado el: mié 21/09/2011 17:08 Para: ESTEBA

Re: [R] Quelplot

2011-09-22 Thread Den Alpin
Hi Hadley, have a look at: http://www.riani.it/pub/zrc-csda98.pdf and some Gauss code: http://www.riani.it/Gauss/procedures/BOXPLOTB.G Best regards, Daniele 2011/9/21 Hadley Wickham : > Hi all, > > Does anyone have an R implementation of the queplot (K. M. Goldberg > and B. Iglewicz. Bivariate

[R] comparing mixed binomial model against the same model without random effect

2011-09-22 Thread Simone Santoro
Hi everybody, If I am correct, you can compare a model with random effect with the same model without the random effect by using the nlme function, like this: no.random.model <- gls(Richness ~ NAP * fExp, method = "REML", data = RIKZ) random.model <- lme(Richness ~NAP * fExp, data

  1   2   >