Re: [R] Mixed Effects Model on Within-Subjects Design

2010-05-20 Thread Dave Deriso
Hi Dave, Thank you for your helpful advice. I will take a look at the multicomp package. I was wondering where the lme() function outputs the interaction between condition*difficulty? Below is the output to the code I had originally sent. Which one of these is condition*difficulty? Fixed effect

[R] computer out of memory when using sigpathway

2010-05-20 Thread 山中程
Dear R users, I am sorry to disturb you! But I really need your help for the usage of sigPathwy. Actually, I want a sliding window analysis for possible chromosome expression pattern mining. My research microorganism is a plant pathogen, Gibberella zeae, and I first used SAS to divid

Re: [R] Mixed Effects Model on Within-Subjects Design

2010-05-20 Thread Dave Deriso
Hi Dave, Thank you for your helpful advice. I will take a look at the multicomp package. I was wondering where the lme() function outputs the interaction between condition*difficulty? Below is the output to the code I had originally sent. Which one of these is condition*difficulty? Fixed effect

Re: [R] save in for loop

2010-05-20 Thread Ivan Calandra
Thanks to all of you for your answers! Peter's is definitely the easiest :) for (i in 1:4) { temp <- data.frame(a=(i+1):(i+10), b=LETTERS[(i+1):(i+10)]) filename <- paste("file", i, sep="") assign(filename, temp) save(list=c(filename), file=paste(filename, ".rda", sep="")) } Tao, I do

[R] writing autocorrelation and partial auto correlation functions to a file

2010-05-20 Thread nuncio m
Dear All, I am very new to T. I need to fit a ARIMA model to my time series. So I found the auto correlation functions and partial auto correlation function in R. Now I want to save these valuse along with the significance levels to a file. How to do that?. I tried some function in R

Re: [R] save in for loop

2010-05-20 Thread Ivan Calandra
Hi Dennis, What is the problem with using eval(parse(text=...))? Is there a reason why not to use it? Of course, in that case, "list" within save() is much easier and works perfectly. In any case, thanks for your explanations :) Ivan Le 5/20/2010 10:26, Dennis Murphy a écrit : > Hi: > > On Thu

[R] Deleting a file on a drive from within R

2010-05-20 Thread Sergey Goriatchev
Hello, I have an Excel file on a drive and I extract data from it into R session. Once I have extracted the data, I want to delete that Excel file from the drive. Can I do that from within R, please? Thank you for help! Regards, Sergey __ R-help@r-pro

Re: [R] Deleting a file on a drive from within R

2010-05-20 Thread Tal Galili
Check out: ?unlink Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Deleting a file on a drive from within R

2010-05-20 Thread Dave Deriso
file_to_delete = file.choose() file.remove(file_to_delete) Best, Dave Deriso UCSD Psychology On Thu, May 20, 2010 at 1:46 AM, Sergey Goriatchev wrote: > Hello, > > I have an Excel file on a drive and I extract data from it into R session. > Once I have extracted the data, I want to delete that E

Re: [R] Deleting a file on a drive from within R

2010-05-20 Thread Sergey Goriatchev
Thank you, Dave! Regards, Sergey On Thu, May 20, 2010 at 10:55, Dave Deriso wrote: > file_to_delete = file.choose() > file.remove(file_to_delete) > > Best, > Dave Deriso > UCSD Psychology > > On Thu, May 20, 2010 at 1:46 AM, Sergey Goriatchev wrote: >> Hello, >> >> I have an Excel file on a dri

Re: [R] Mixed Effects Model on Within-Subjects Design

2010-05-20 Thread ONKELINX, Thierry
Dear Dave, I think you want this model. lme(value~condition:diff - 1,random=~1|subject) Note that I removed the replicate ID from the model. Include it in the model makes only sense if you can expect a similar replication effects the first/second/thirth time that a subject performs your test.

Re: [R] Deleting a file on a drive from within R

2010-05-20 Thread Sergey Goriatchev
Thanks, Tal Will check it out. Regards, Sergey On Thu, May 20, 2010 at 10:51, Tal Galili wrote: > Check out: > ?unlink > > > > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972-52-7275845 > Read me: www.talgalil

[R] Minimization problem

2010-05-20 Thread Fred
Dear R users, I am trying to minimize two function simultaneously in R, function(x) minimize x[1],x[2],x[3] mean(distribution(x1,x2,x3) ) - observed mean std(distribution(x1,x2,x3)) - observed std What I want to achieve is that simulated mean and standard deviation of distribution related to

[R] Compressed values on y-axis in effects plot

2010-05-20 Thread Simon Kiss
Dear colleagues, the code below generated the two effects plots that I have attached. I hope they are not stripped. The original two models are as follows: green_shift_mod=glm(green_shift ~ educ+party_id+educ:party_id, family=binomial, data=x) carbon_tax_mod=glm(carbon_tax ~ educ+party_id+edu

Re: [R] Mixed Effects Model on Within-Subjects Design

2010-05-20 Thread Dave Deriso
Hi Thierry, Thank you so much for your response! I ran the model and I obtained some strange results (see below). Is there a simple way to compute a condition x difference interaction with the lme? Also, I read in the R Book (Crawley, 2007) that repeated measures on the same day would be temporal

[R] Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)

2010-05-20 Thread Nevil Amos
I am receiving the above error ( full r session output below) the script runs OK in windows. and "genotypes" and "ploidy" are both correct arguments any suggestions would be most welcome Nevil Amos MERG/ACB Monash University School of Biological Sciences > library(Geneland) Loading

[R] Reading results of commands in Microsoft Word typed in the terminal window, A question from a Blind R user.

2010-05-20 Thread Faiz Rasool
Hi all, I would like to read the results of the commands type in the terminal window in Microsoft Word. As a blind user my options are somewhat limited and are time consuming if I want to see the results of the commands that I have type earlier. for example if my first two commands were x<-c

Re: [R] Mixed Effects Model on Within-Subjects Design

2010-05-20 Thread ONKELINX, Thierry
Dear Dave, The model is correct. But it is not testing the hypotheses you want. The null hypothesis is that each level of the interaction is zero, which is clearly not the fact. I misread you question, therefore my advise was not accurate. Since you are explicitly interested in comparing all l

[R] Sweave and uttf-8 under Windows XP

2010-05-20 Thread Sven Garbade
Hi list, I need to process a Rnw file and and a csv file (both are encoded in UTF-8) under Windows XP (R Version 2.11.0, i386, mingw32). I can source and run the Rnw file: > Stangle("Bericht.Rnw") Writing to file Bericht.R > source(file("Bericht.R", encoding="UTF-8")) which runs fine, but runn

Re: [R] Geneland error on unix: Error in MCMC(........ :, unused argument(s) (ploidy = 2, genotypes = geno)

2010-05-20 Thread Jombart, Thibaut
Hello, you may want to contact directly the maintainer of Geneland for that kind of issue. In any case, this post would be best suited for R-sig-genetics: https://stat.ethz.ch/mailman/listinfo/r-sig-genetics Best regards, Thibaut -- ## Dr Thibaut JOMBART MRC

Re: [R] Minimization problem

2010-05-20 Thread Bernardo Rangel Tura
On Thu, 2010-05-20 at 01:35 -0700, Fred wrote: > Dear R users, > > I am trying to minimize two function simultaneously in R, > > function(x) > > minimize x[1],x[2],x[3] > > mean(distribution(x1,x2,x3) ) - observed mean > > std(distribution(x1,x2,x3)) - observed std > > What I want to achieve

Re: [R] Sweave and uttf-8 under Windows XP

2010-05-20 Thread Sven Garbade
Great, thanks, Sveb 2010/5/20 Duncan Murdoch : > Sven Garbade wrote: >> >> Hi list, >> >> I need to process a Rnw file and and a csv file (both are encoded in >> UTF-8) under Windows XP  (R Version 2.11.0, i386, mingw32). >> > > Take a look at this post: > > http://tolstoy.newcastle.edu.au/R/e10/h

[R] R 2.11.1 Scheduled for May 31

2010-05-20 Thread Peter Dalgaard
This is to announce that we plan to release R version 2.11.1 on Monday, May 31, 2010. Those directly involved should review the generic schedule at http://developer.r-project.org/release-checklist.html The source tarballs will be made available daily (barring build troubles) via http://cran.r-pr

[R] Plot ICC one item each in ltm

2010-05-20 Thread Maulik Shah
May I ask for the help on how to plot Item characteristic curve (ICC) one item each. I have fit 3 parameter model for a test with 40 items.Currently I get ICC for all the 40 items in a single graph making it difficult to interpret. Thanks and Regards, -- Maulik Shah [[alternative HTML ve

Re: [R] Sweave and uttf-8 under Windows XP

2010-05-20 Thread Duncan Murdoch
Sven Garbade wrote: Hi list, I need to process a Rnw file and and a csv file (both are encoded in UTF-8) under Windows XP (R Version 2.11.0, i386, mingw32). Take a look at this post: http://tolstoy.newcastle.edu.au/R/e10/help/10/05/4889.html which discussed this issue recently. Duncan M

[R] Re : Manipulating Data Frames

2010-05-20 Thread Mohan L
Dear All, I have data some thisng like this : > data <- read.csv(file='ipsample.csv',sep=',' , header=TRUE) > data State Jan Feb Mar Apr May Jun 1 AAA11022 0 2 BBB 1298 1195 1212 1244 1158 845 3 CCC 00012 1 4 DDD5 11 17 15 10

[R] [R-pkgs] New package: `lavaan' for latent variable analysis (including structural equation modeling)

2010-05-20 Thread Yves Rosseel
Dear R-users, A new package called `lavaan' (for latent variable analysis) has been uploaded to CRAN. The current version of lavaan (0.3-1) can be used for path analysis, confirmatory factor analysis, structural equation modeling, and growth curve modeling. More information can be found on t

Re: [R] writing autocorrelation and partial auto correlation functions to a file

2010-05-20 Thread Glen Barnett
The problem is that the acf function (like many R functions) returns a list containing many different things. For example, I have a short series in the vector z: > acz <- acf(z) > str(acz) List of 6 $ acf : num [1:11, 1, 1] 1 -0.0668 -0.7401 0.0627 0.5954 ... $ type : chr "correlation" $ n.u

[R] How could I restrict and reordered data.frames?

2010-05-20 Thread Csima Gabriella
Dear Everyone, I 've just begun to use the library ncdf and I would like to compare meteorological observational data with forecast data, so to make verification. The netcdf files I'm using contain data of many different parameters in many different stations. I could read easily that I need

[R] pie3D

2010-05-20 Thread n.via...@libero.it
Dear list, I would like to know if is it possible to add a legend to a pie3D?? Thanks for your attention! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-

Re: [R] pie3D

2010-05-20 Thread Jim Lemon
On 05/20/2010 09:06 PM, n.via...@libero.it wrote: Dear list, I would like to know if is it possible to add a legend to a pie3D?? Thanks for your attention! Hi n.vialma, You sure can. Try adding this to the example: legend(-1,1,c("Haters","Opposers","Apathizers","Lovers"),fill=rainbow(4)) Jim

[R] Overlap of leaf labels

2010-05-20 Thread Ayesha Jadoon
Hi, I have tried looking at the archives but havent found any answer that works till now (Sorry if i have missed anything) I am a newbie to R and i am trying to carry out hierarchical clustering using hclust -> as.dendrogram and then plotting the results as a dendrogram using the plot function p

Re: [R] Overlap of leaf labels

2010-05-20 Thread Ivan Calandra
Hi, I think that one of the cex arguments in par() can be what you're looking for. But since I've never plotted any dendrogram, I don't know which one, if any. HTH, Ivan Le 5/20/2010 14:08, Ayesha Jadoon a écrit : Hi, I have tried looking at the archives but havent found any answer that work

[R] use object within rda file in for loop

2010-05-20 Thread Ivan Calandra
Dear users, I would like to process all the lists from all *.rda files that I have in one folder. Up to now, I can load all the *.rda files without any problem. The problem is when I want to access the list saved within each *.rda file (only one list per rda file). Here is my code: fpath <-

[R] logarithmic integrals in R?

2010-05-20 Thread Oliver Kullmann
Hello, I couldn't find information on whether the logarithmic integrals Li_m(x) = integral_0^x log(t)^(-m) dt for x >= 0 are available in R? Best wishes Oliver __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] How to plot the sample size on top of the bars of a barchart plot?

2010-05-20 Thread Jabba
> > Dear Marco, > > I was trying using lattice barchart() but your suggestion will do the > trick. > > Many thanks > > Javier Lattice is great but a bit hard for me to learn and customize. I think you should use ltext() in this case or edit panel.barchart() by hand, but I don't know how.

Re: [R] Re : Manipulating Data Frames

2010-05-20 Thread Henrique Dallazuanna
Try this: (data[,-(1:2)] - data[,2]) * prop.table(data[,2]) + data[,2] On Thu, May 20, 2010 at 7:38 AM, Mohan L wrote: > Dear All, > > I have data some thisng like this : > > > data <- read.csv(file='ipsample.csv',sep=',' , header=TRUE) > > > data > State Jan Feb Mar Apr May Jun > 1 AA

Re: [R] computer out of memory when using sigpathway

2010-05-20 Thread Martin Morgan
On 05/19/2010 09:15 PM, ?? wrote: > Dear R users, > > > > I am sorry to disturb you! But I really need your help for the usage > of sigPathwy. Please ask questions about Bioconductor packages on the Bioconductor mailing list, as other Bioconductor users are the ones mostly likely to have ex

Re: [R] Re : Adding column sum to new row in data frame

2010-05-20 Thread David Winsemius
On May 20, 2010, at 1:01 AM, Joshua Wiley wrote: Dear Mohan, First, I would like to modify my code slightly to: data <- rbind(data,data.frame(State="Total",t(apply(data[,-1], 2, sum, na.rm=TRUE This actually will add a 7th level to your factor automatically. The reason I wanted to chang

Re: [R] How could I restrict and reordered data.frames?

2010-05-20 Thread jim holtman
? merge > obs <- read.table(textConnection("12866 14.4 + + 12844 14.1 + + 12843 16.5 + 12860 14.9 + 128519.8 + + 12846 15.3"), col.names=c('station', 'obs')) > fore <- read.table(textConnection("12830 12.808611 + 12836 12.725081 + 12843 15.241580 + 12844 15.185887 + 12846 1

[R] sort a data.frame

2010-05-20 Thread Yuan Jian
Hello,   I have a dataframe: dd <- data.frame(b = c("chr2", "chr1", "chr15", "chr13"),     x = c("A", "D", "A", "C"), y = c(8, 3, 9, 9),     z = c(1, 1, 1, 2))   >dd   b x y z 1  chr2 A 8 1 2  chr1 D 3 1 3 chr15 A 9 1 4 chr13 C 9 2 Now I want to sort them according column "b", but onl

[R] Repeated measures in R

2010-05-20 Thread GenTOstats
Hey all I am relatively new to analysis in R (and am a geneticist so apologies for rubbish questions ), I have a question regarding repeated measures analysis this was what i have done so far 1)ph<-make.rm(constant=c("sid","pheno1","snp","sex","age"),repeated=c("measure1","measure2"),data=fil

Re: [R] Re : Manipulating Data Frames

2010-05-20 Thread David Winsemius
On May 20, 2010, at 6:38 AM, Mohan L wrote: Dear All, I have data some thisng like this : data <- read.csv(file='ipsample.csv',sep=',' , header=TRUE) data State Jan Feb Mar Apr May Jun 1 AAA11022 0 2 BBB 1298 1195 1212 1244 1158 845 3 CCC 000

Re: [R] use object within rda file in for loop

2010-05-20 Thread Ivan Calandra
I've found the answer: get() is exactly what I need, I completely forgot about this function. There might be a better way, but that works for me. Ivan Le 5/20/2010 14:13, Ivan Calandra a écrit : Dear users, I would like to process all the lists from all *.rda files that I have in one folder.

Re: [R] col allocation is not right

2010-05-20 Thread jim holtman
Look at the RColorBrewer package to understand how you can create the colors you want. Also do "?colorRampPalette" On Wed, May 19, 2010 at 4:24 PM, Changbin Du wrote: > Thanks, Phil! > > Does that mean only eight colors can be used in R plot? > THe following codes works for me, but, if I use the

Re: [R] sort a data.frame

2010-05-20 Thread jim holtman
> dd b x y z 1 chr2 A 8 1 2 chr1 D 3 1 3 chr15 A 9 1 4 chr13 C 9 2 > # add column with just numbers > dd$sort <- as.integer(gsub("\\D+", "", dd$b)) > dd[order(dd$sort),] # notice it is a numeric, not character order b x y z sort 2 chr1 D 3 11 1 chr2 A 8 12 4 chr13 C 9 2 1

Re: [R] writing autocorrelation and partial auto correlation functions to a file

2010-05-20 Thread David Winsemius
On May 20, 2010, at 3:38 AM, nuncio m wrote: Dear All, I am very new to T. I need to fit a ARIMA model to my time series. So I found the auto correlation functions and partial auto correlation function in R. Now I want to save these valuse along with the significance levels to a fi

Re: [R] Overlap of leaf labels

2010-05-20 Thread David Winsemius
On May 20, 2010, at 8:17 AM, Ivan Calandra wrote: Hi, I think that one of the cex arguments in par() can be what you're looking for. But since I've never plotted any dendrogram, I don't know which one, if any. ?par Appears that the first effort should be to use cex.lab = 0.3 or some su

Re: [R] sort a data.frame

2010-05-20 Thread Nikhil Kaza
Try this. dd[order(gsub("chr","",dd$b)),] You need regular expressions if chr is not the only characterstring that is prepended to the numbers. look for ?strsplit Nikhil Kaza University of North Carolina nikhil.l...@gmail.com On May 20, 2010, at 8:28 AM, Yuan Jian wrote: Hello, I have

Re: [R] sort a data.frame

2010-05-20 Thread Mohamed Lajnef
The solution given by Jim is more correct dd[order(as.numeric(substr(dd$b,4,5))),] regards M jim holtman a écrit : dd b x y z 1 chr2 A 8 1 2 chr1 D 3 1 3 chr15 A 9 1 4 chr13 C 9 2 # add column with just numbers dd$sort <- as.integer(gsub("\\D+", "", dd$b)) dd[order(dd$sort),]

Re: [R] Overlap of leaf labels

2010-05-20 Thread Ivan Calandra
Hi again, Have you also tried cex.lab? And values <0.8, maybe 0.5 or even 0.3? Output as Pdf/Ps shouldn't be a problem, or is it? I cannot help you more without a reproducible example (read the posting guide, it's linked at the bottom of every email from the list), though even with it, I'm no

Re: [R] Re : Re : Nomogram with multiple interactions (package rms)

2010-05-20 Thread Frank E Harrell Jr
On 05/20/2010 01:42 AM, Marc Carpentier wrote: Thank you for your responses, but I don't think you're right about the doc... I carefully looked at it before posting and ran the examples, looked in Vanderbilt Biostat doc, and just looked again example(nomogram) : 1st example : categorical*contino

Re: [R] sort a data.frame

2010-05-20 Thread Jorge Ivan Velez
Hi Yuan, Try dd[order(as.numeric(gsub("[^0-9]", "", dd$b))), ] HTH, Jorge On Thu, May 20, 2010 at 8:28 AM, Yuan Jian <> wrote: > Hello, > > I have a dataframe: > dd <- data.frame(b = c("chr2", "chr1", "chr15", "chr13"), > x = c("A", "D", "A", "C"), y = c(8, 3, 9, 9), >z = c(1, 1,

Re: [R] Minimization problem

2010-05-20 Thread Ravi Varadhan
That would not work in "optim". The objective function must take in a vector of parameters and return a scalar value. Your objective function does not return a scalar. This would work: test <- function(x, ...){ m.error <- mean(distribution(x)) - observed.mean sd.error <- std(distribution(x))

Re: [R] Overlap of leaf labels

2010-05-20 Thread David Winsemius
I got an offlist response saying my advice was not correct, not surprising in the absence of a reproducible example on which to test. Looking at the help page, which seems the sensible place for anyone to start, we see that the second plotting example for dendrograms uses lab.cex and it nee

Re: [R] use object within rda file in for loop

2010-05-20 Thread Henrik Bengtsson
On Thu, May 20, 2010 at 3:06 PM, Ivan Calandra wrote: > I've found the answer: > get() is exactly what I need, I completely forgot about this function. > > There might be a better way, but that works for me. I R.utils, there are saveObject() and loadObject(), which allows you to save and load obj

Re: [R] Overlap of leaf labels

2010-05-20 Thread Ayesha Jadoon
Hi Sorry to be honest, i hit reply before i realised! Thanks a bunch! It worked! I can visualise the labels! Ayesha Jadoon PhD student PSD, FWB Kings college London SE1 9NH UK On Thu, May 20, 2010 at 2:38 PM, David Winsemius wrote: > I got an offlist response saying my advice was not correct,

Re: [R] use object within rda file in for loop

2010-05-20 Thread Ivan Calandra
Hi Henrik, Thank you for this suggestion, it does sound easier indeed! Ivan Le 5/20/2010 15:50, Henrik Bengtsson a écrit : On Thu, May 20, 2010 at 3:06 PM, Ivan Calandra wrote: I've found the answer: get() is exactly what I need, I completely forgot about this function. There might be

[R] finding euclidean proximate points in two datasets

2010-05-20 Thread Alexander Shenkin
Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. Given a set of points in 2-d space X, i'm trying to find the subset of points in Y proximate to each point in X. Furthermore, the proximity threshold of each point in X differs (X$thre

Re: [R] finding euclidean proximate points in two datasets

2010-05-20 Thread David Winsemius
On May 20, 2010, at 10:02 AM, Alexander Shenkin wrote: Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. There is a SIG for such questions. Given a set of points in 2-d space X, i'm trying to find the subset of points in Y p

[R] [Off topic?] Time dependent Cox model fitting and validation

2010-05-20 Thread Jabba
DeaR users. These days i'm working on fitting an extended Cox model with time-dependent covariables and possibly time-varying effects. My data are in counting process format as described in Therneau&Grambsh's `Modeling Survival Data', page 68. I'm trying to follow Harrell's `Regression Modeling

[R] getSubClasses()?

2010-05-20 Thread Albert-Jan Roskam
Hi,   Is there a built in function that returns a character vector of all subclasses of a given superclass? showClass(Class = "SomeClass") contains the info that I want, but I don't know how to access it. getSubClasses <- function(superClass) return(setdiff(getClasses(.GlobalEnv), superClass))

[R] Time problems (POSIXct)

2010-05-20 Thread Research
Hello, I have a zoo time series object (say a) with the following time stamp/format [1] "1950-01-03 GMT" "1950-01-04 GMT" "1950-01-05 GMT" "1950-01-06 GMT" [5] "1950-01-09 GMT" "1950-01-10 GMT" and another (say b) with [1] "1950-01-05" "1950-01-06" "1950-01-09" "1950-01-10" "1950-01-11"

Re: [R] getSubClasses()?

2010-05-20 Thread Martin Morgan
On 05/20/2010 07:47 AM, Albert-Jan Roskam wrote: > Hi, > > Is there a built in function that returns a character vector of all > subclasses of a given superclass? showClass(Class = "SomeClass") > contains the info that I want, but I don't know how to access it. Hi Albert-Jan -- Maybe > slotNam

Re: [R] Time problems (POSIXct)

2010-05-20 Thread Cedrick W. Johnson
try: as.POSIXct(datestr, format="%y-%m-%d") for the first timeseries... -c On 5/20/2010 10:48 AM, Research wrote: Hello, I have a zoo time series object (say a) with the following time stamp/format [1] "1950-01-03 GMT" "1950-01-04 GMT" "1950-01-05 GMT" "1950-01-06 GMT" [5] "1950-01-09 GM

[R] Antwort: Re: Multiple language output - Correct in RGui, wrong in .txt after sink()

2010-05-20 Thread mark . redshaw
Dear Brian, many thanks for reply it helped a great deal. But firstly an apology for not providing the "at a minimum",my (newbe) error, sorry for making you guess. The info is/was: > sessionInfo() R version 2.10.0 (2009-10-26) i386-pc-mingw32 locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYP

Re: [R] Time problems (POSIXct)

2010-05-20 Thread Gabor Grothendieck
The warning message does tell you exactly what was wrong. You are trying to merge zoo objects that have two different index classes. The first is "POSIXct" and the second is "Date" class. Next time please provide your data in reproducible form as shown here: > library(zoo) > z1 <- zoo(1:6, as.D

Re: [R] getSubClasses()?

2010-05-20 Thread Albert-Jan Roskam
Hi Martin,   Great, the second solution is precisely what I've been looking for. Thanks a lot! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a f

Re: [R] finding euclidean proximate points in two datasets

2010-05-20 Thread Alexander Shenkin
On 5/20/2010 9:18 AM, David Winsemius wrote: > > On May 20, 2010, at 10:02 AM, Alexander Shenkin wrote: > >> Hello all, >> >> I've been pouring through the various spatial packages, but haven't come >> across the right thing yet. > > There is a SIG for such questions. thanks - just joined it.

[R] esthetics --- extending the lm command to fixed effects?

2010-05-20 Thread ivo welch
dear R wizards: not important. more a curiosity or esthetics question. is there a way to extend the standard lm command, so that it takes a new argument that handles fixed effects? right now, I have (provided to me from an expert---I would have never figured this one out): diffid <- functi

[R] RODBC: owerwrite into a named range in Excel

2010-05-20 Thread Jay
Hello, Let's say that I have a data frame of n numbers I want to transfer into a Excel spreadsheet. I have opened the conection to the file using ODBC, and I can query the content of these n cells without problem. However, how do I transfer my new values to these cells? I.e., overwite them. Shoul

Re: [R] offset in gam and spatial scale of variables

2010-05-20 Thread Lucia Rueda
Hi, Thanks for the inputs. I talked to my coworker, who has been the one doing the analysis. Perhaps I wasn't making myself clear about the “differences in spatial scales”. Here is what he says: "The truth is that measuring scales (i.e all area related variable are measured in m2) and spatial d

Re: [R] factor

2010-05-20 Thread RockO
Try, ofr a factor: > x <-c("A","B","C") > x <- factor(x) > levels(x) [1] "A" "B" "C" > x <- factor(x,levels=levels(x)[c(3,2,1)]) > levels(x) [1] "C" "B" "A" Rock, DRF -- View this message in context: http://r.789695.n4.nabble.com/factor-tp879983p2224639.html Sent from the R help mailing list a

Re: [R] Using svychisq inside user-defined function

2010-05-20 Thread Thomas Lumley
On Wed, 19 May 2010, Sabatier, Jennifer F. (CDC/OID/NCHHSTP) wrote: Hi R-help, Yes, this is my second request for assistance in a single day I am attempting to use svychisq() inside a function I made. The goal of this function is to produce a table of summary statistics that I can later

[R] Svy function doesn't work nested in user-defined function

2010-05-20 Thread Sabatier, Jennifer F. (CDC/OID/NCHHSTP)
Hi R-help, I posted about this late yesterday but got no response. I may have put TMI in the original request. Not to mention I couldn't cut and paste yesterday because I was working R off a non-network computer while asking for help on a network computer. Essentially, I have this user-define

Re: [R] esthetics --- extending the lm command to fixed effects?

2010-05-20 Thread Thomas Lumley
On Thu, 20 May 2010, ivo welch wrote: dear R wizards: not important. more a curiosity or esthetics question. is there a way to extend the standard lm command, so that it takes a new argument that handles fixed effects? right now, I have (provided to me from an expert---I would have never fi

[R] RSpython Ubuntu

2010-05-20 Thread kaveh vakili
Dear List, I'd like to call pyhton function from within R. I tried installing the latest version of RSPython: wget http://www.omegahat.org/RSPython/RSPython_0.7-1.tar.gz R CMD INSTALL --clean RSPython_0.7-1.tar.gz I get a compile error (posted below). Did anyone else run against this ? Is the

[R] Comparing three groups, data: present, absent

2010-05-20 Thread Mächler Marc Jacques
Dear R-Experts, Dear friends of dung. I have a statistical Problem, to which nobody I asked could give me an answer. Maybe you can. I was in the African-Savanna and made a Dung-Monitoring. This means I walked randomly over the field and for every Dung-Event I found I noted following parameters

Re: [R] esthetics --- extending the lm command to fixed effects?

2010-05-20 Thread ivo welch
hi thomas--- thanks for the answer. the problem with the "+factor(fmid)" is not just that it provides uninteresting coefficients and that it eats more memory, but that it is also MUCH slower when there are (hundred of) thousands of fixed effects. Does Bill Venables describe how to do extend the

Re: [R] RSpython Ubuntu

2010-05-20 Thread kaveh vakili
kaveh vakili ulb.ac.be> writes: > > Dear List, > > I'd like to call pyhton function from within R. I tried installing the latest > version of RSPython: > > wget http://www.omegahat.org/RSPython/RSPython_0.7-1.tar.gz > R CMD INSTALL --clean RSPython_0.7-1.tar.gz > > I get a compile error (po

[R] Kate terminal window

2010-05-20 Thread Luc Villandre
Dear R-users, I've recently switched to Ubuntu and I've decided to use Kate to edit my R code. I really like how Kate allows one to simply pipe their code to the terminal. However, I would find it even better if I could actually get the Kate console to display error messages (or any console ou

Re: [R] offset in gam and spatial scale of variables

2010-05-20 Thread Joris Meys
On Thu, May 20, 2010 at 3:20 PM, Lucia Rueda wrote: > > Hi, > > Thanks for the inputs. I talked to my coworker, who has been the one doing > the analysis. Perhaps I wasn't making myself clear about the “differences > in > spatial scales”. Here is what he says: > > "The truth is that measuring sc

[R] writing function

2010-05-20 Thread arnaud Gaboury
Dear group, I am trying to write functions, but as a beginner, everything is not so obvious. Let's say I want the results in a list of elemts like this : tot1, tot2, etc Here is a function: toto <- function(x,y) { for(i in x:y){ paste(c("tot",i),collapse="")<-(i*2) } } If I type this : >to

Re: [R] writing function

2010-05-20 Thread Tal Galili
Try this: paste("tot", 4:16, sep = "") Or: func <- function(x,y) { paste("tot", x:y, sep = "") } func(4,16) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.b

Re: [R] esthetics --- extending the lm command to fixed effects?

2010-05-20 Thread Achim Zeileis
On Thu, 20 May 2010, ivo welch wrote: hi thomas--- thanks for the answer. the problem with the "+factor(fmid)" is not just that it provides uninteresting coefficients and that it eats more memory, but that it is also MUCH slower when there are (hundred of) thousands of fixed effects. There i

[R] sqldf: issues with natural joins

2010-05-20 Thread Nick Switanek
Hello, I'm having trouble discovering what's going wrong with my use of natural joins via sqldf. Following the instructions under 4i at http://code.google.com/p/sqldf/, which discusses creating indices to speed joins, I have been only unreliably able to get natural joins to work. For example, >

Re: [R] [Off topic?] Time dependent Cox model fitting and validation

2010-05-20 Thread Marco Barbàra
this is self-reply only to insert my real name __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

[R] Question about difftime()

2010-05-20 Thread Stella Pachidi
Dear R experts, I have a question about the result of difftime() function: Does it take into account the different number of days in each month. In my example, I have the following: > firstDay [1] "2010-02-20" > lastDay [1] "2010-05-20 16:00:00" > difftime(lastDay,firstDay,units='days') Time diff

Re: [R] p-values < 2.2e-16 not reported

2010-05-20 Thread Will Eagle
On 2010-05-20 08:52, Shi, Tao wrote: Will, I'm wondering if you have any insights after looking at the cor.test source code. It seems to be fine to me, as the p value is either calculated by "your first method" or a .C code. ...Tao Dear Tao, I think the described problem of p-values < 2.

Re: [R] finding euclidean proximate points in two datasets

2010-05-20 Thread David Winsemius
On May 20, 2010, at 11:12 AM, Alexander Shenkin wrote: On 5/20/2010 9:18 AM, David Winsemius wrote: On May 20, 2010, at 10:02 AM, Alexander Shenkin wrote: Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. There is a SIG for

Re: [R] writing function

2010-05-20 Thread Ivan Calandra
Hi, the problem is not about the environment, but about the paste(c("tot", i), collapse = "") which is not recognized as an object. Maybe assign() could do the trick You could also do it this way (though it's not exactly what you want, but it might be better): toto <- function(x,y){ tot

Re: [R] About the breakpoint when making heatmap with lots of variables

2010-05-20 Thread Shi, Tao
The "breakpoint" you mentioned is irrelevant here. Clustering 15672 genes (I assume this is a microarray data) requires lots of memory. I suggest you either filter your gene list down to thousands or just plot the column dendrogram without showing the heatmap. plot(hclust(dist(x))) ...Tao

Re: [R] sqldf: issues with natural joins

2010-05-20 Thread Gabor Grothendieck
There are two problems: 1. A natural join will join all columns with the same names in the two tables and that includes not only Tid but also dfName and since there are no rows that have the same Tid and dfName the result has zero rows. 2. the heuristic it uses fails when you retrieve the same co

Re: [R] Question about difftime()

2010-05-20 Thread Marc Schwartz
On May 20, 2010, at 11:08 AM, Stella Pachidi wrote: > Dear R experts, > > I have a question about the result of difftime() function: Does it > take into account the different number of days in each month. In my > example, I have the following: > >> firstDay > [1] "2010-02-20" >> lastDay > [1] "2

Re: [R] Kate terminal window

2010-05-20 Thread Vojtěch Zeisek
Dne Čt 20. května 2010 17:50:42 Luc Villandre napsal(a): > Dear R-users, > > I've recently switched to Ubuntu and I've decided to use Kate to edit my > R code. I really like how Kate allows one to simply pipe their code to > the terminal. However, I would find it even better if I could actually >

[R] Strange behaviour when using diff with POSIXt and POSIXlt objects

2010-05-20 Thread Julian Burgos
Dear list, I´m calculating time differences between series of time stamps and I noticed something odd: If I do this... > time1=strptime("2009 05 31 22 57 00",format="%Y %m %d %H %M") > time2=strptime("2009 05 31 23 07 00",format="%Y %m %d %H %M") > > diff(c(time1,time2),units="mins") Time differ

[R] Courses***More R courses scheduled for June 2010 by XLSolutions Corp

2010-05-20 Thread Sue Turner
We've scheduled more R courses for June 2010 in Washington DC, San Francisco, Seattle, New York City and other USA cities http://www.xlsolutions-corp.com/Rcourses May - June 2010 *** R/S: Programming Essentials *** R Fundamentals and Programming Techniques *** R/S-PLUS Functions by Example *** R

Re: [R] sqldf: issues with natural joins

2010-05-20 Thread Gabor Grothendieck
Although that works I had meant to write: > names(B)[2] <- "dfNameB" > # ... other commands > sqldf('select * from main.A natural join main.B') so that now only Tid is in common so the natural join just picks it up and also the heuristic works again since we no longer retrieve duplicate column na

[R] Specify correlation structure in lme4

2010-05-20 Thread Thomas Stewart
I know this was asked and answered in 2005, I just want to make sure the answer still holds in 2010. Question: If I have the mixed-model with lmer( y ~ x1 + x2 + (1 | id) + (z1 | w ) , ... ) there is no way for me to specify a correlation structure for the random effects? Right? If I want to s

Re: [R] Strange behaviour when using diff with POSIXt and POSIXlt objects

2010-05-20 Thread jim holtman
Please provide information as to what version you are using; works fine for me: > time3=strptime("2009 06 01 00 47 00",format="%Y %m %d %H %M") > time4=strptime("2009 06 01 00 57 00",format="%Y %m %d %H %M") > > diff(c(time3,time4)) Time difference of 10 mins > I have version 2.10.1 On Thu, May

  1   2   >