Re: [R] The elegant way to test if a number is a whole number

2011-09-08 Thread Jason Morgan
Hello Alex, Have you tried the modulus operator? 2 %% 1 [1] 0 2.1 %% 1 [1] 0.1 ~Jason On 2011.09.08 20:27:14, Alexander Engelhardt wrote: Hi, x - 0.2*5 is.integer(x) gives me FALSE because R stores it as a float number, right? Is there an elegant way to work around that

Re: [R] random interaction effect in lmer

2011-02-06 Thread Jason Morgan
Hello Federico, You should try sending this to the mixed models mailing list (link below). Also, it would probably help to know what the data looks like. With the information you provide, it's hard to say what the problem could be. r-sig-mixed-mod...@r-project.org Best, ~Jason On 2011.02.06,

Re: [R] Building correlation matrix

2010-05-25 Thread Jason Morgan
On 2010.05.25 11:52:07, Anyi Zhu wrote: Hi, I am a novice with R, so pardon me if the question is a piece of cake to some of you. Say if I have a stream of data consisting of 3 columns, 1st column is birth date, 2nd is death date and third is weight for each individual. My ultimate

Re: [R] functions sample() and S.SI()

2010-05-11 Thread Jason Morgan
On 2010.05.11 18:30:57, Lourdes Molera wrote: Hello, I need to select a sample from a small population using simple random sampling without replacement. I've found two possibilities in R, the function sample() and the function S.SI() in the package TeachingSampling, but I don't know which

Re: [R] Sata and R users GLM methods translation

2010-01-22 Thread Jason Morgan
Hello Jean-Baptiste, On 2010.01.22 16:32:53, Jean-Baptiste Combes wrote: Hello, I am learning R and I am fluent in Stata and I try to translate part of my Stata code to R to check the reliability of the data under R. I have a proportion variable as a dependent variable pQSfteHT .

Re: [R] lattice, add text to xyplot

2010-01-08 Thread Jason Morgan
On 2010.01.08 19:44:39, Ivan Gregoretti wrote: Hello listers, Does anybody know how to add text to an xyplot without whipping out the existing curve? That's all. For instance, Lets say you generate a graph like this A - data.frame(x = rnorm(100), y = rnorm(100)) xyplot(y ~ x, data

Re: [R] as.Date question

2009-12-20 Thread Jason Morgan
Hello, On 2009.12.20 18:06:17, MAL wrote: All! This piece of code: zzz1 - as.POSIXct(1999-03-18, tz=CET) zzz2 - as.POSIXlt(1999-03-18, tz=CET) zzz1 == zzz2 as.Date(zzz1) as.Date(zzz2) yields TRUE for zzz1==zzz2, but the two dates returned by as.Date are different:

Re: [R] plotting polynomial regression line

2009-12-20 Thread Jason Morgan
Hello Amit, On 2009.12.20 19:35:09, Amit wrote: Dear All, I am trying to plot polynomial regression line to a scatterplot. I did following so far: x=c(1:9335) y=read.table(gp.txt,header=T,sep=\t) length(y$PCC) # y$PCC has values between 1 to 0 in decreasing order [1] 9335

Re: [R] Incorporating the results of White's HCCM into a linear regression:

2009-12-04 Thread Jason Morgan
On 2009.12.03 23:52:15, Yoseph Zuback wrote: Hi Frank, I'm trying to repair heteroscedastic variables using the hccm. A statistician in my department gave an incomplete solution that included: OLS1$coefficients/(sqrt(hccm(OLS1))) Trying to solve my problem I get different results with

Re: [R] Data Manipulation Question

2009-12-03 Thread Jason Morgan
Please refrain from posting HTML. The results can be incomprehensible: On 2009.12.03 13:52:09, John Filben wrote: Can R support data manipulation programming that is available in the SAS datastep??? Specifically, can R support the following: -?? Read multiple dataset one

Re: [R] R on Large Data Sets (again)

2009-11-29 Thread Jason Morgan
On 2009.11.28 21:50:09, Daniel Nordlund wrote: - Is a Unix-like platform a better option than win-64? Again, would this solve my memory limitation problems? Possibly, but Win64 should provide plenty of memory (I believe Windows 7 Ultimate can use up to 192 GB of memory). You just have

Re: [R] R on Large Data Sets (again)

2009-11-29 Thread Jason Morgan
On 2009.11.29 14:24:40, Prof Brian Ripley wrote: Windows 64-bit can certainly handle large memory spaces, but unless something has changed recently it my understanding Revolution Computing's 64-bit is the only 64-bit version of R available for Windows (due to the unavailability of adequate

Re: [R] R on Large Data Sets (again)

2009-11-28 Thread Jason Morgan
Hello Lars, On 2009.11.28 18:53:09, Lars Bishop wrote: Dear R users, I?ve search the R site for help on this topic but it is hard to find a precise answer for my questions. Which are the best options to overcome the RAM memory limitation problems when using R on ?large? data sets (such

Re: [R] Multivariate problems . . . with 200 resposes variables and 1 explanatory variable

2009-11-25 Thread Jason Morgan
Please see the posting guide here: http://www.r-project.org/posting-guide.html In short, it would be helpful if you provided more information on your data and what the goal of your analysis is. However, to get you started, see the polr() function in the MASS package. Depending on your goal/data,

Re: [R] linear mixed model question

2009-09-07 Thread Jason Morgan
Hello Wen: On 2009.09.06 10:49:03, Wen Huang wrote: Hello, I wanted to fit a linear mixed model to a data that is similar in terms of design to the 'Machines' data in 'nlme' package except that each worker (with triplicates) only operates one machine. I created a subset of

Re: [R] run R codes every startup.

2009-08-16 Thread Jason Morgan
On 2009.08.16 15:59:15, milton ruser wrote: Dear all, how can I setup R(gui) to run some commands evertime R startup? cheers milton You'll want to read: help(Startup) HTH, ~Jason -- Jason W. Morgan Graduate Student Department of Political Science *The Ohio State University* 154 North

Re: [R] lme funcion in R

2009-08-03 Thread Jason Morgan
On 2009.08.03 10:15:46, Hongwei Dong wrote: Hi, R users, I'm using the lme function in R to estimate a 2 level mixed effects model, in which the size of the subject groups are different. It turned out that It takes forever for R to converge. I also tried the same thing in SPSS and SPSS can

Re: [R] error ellipse

2009-06-21 Thread Jason Morgan
On 2009.06.20 16:04:21, Alexandru T Codilean wrote: Dear All, I have a data set with the following structure: [A], [a], [B], [b] where [A] and [B] are measurements and [a] and [b] are the associated uncertainties. I produce [B]/[A] vs. [A] plots in R and would like to show

Re: [R] Dummy (factor) based on a pair of variables

2009-04-18 Thread Jason Morgan
On 2009.04.18 13:52:35, Serguei Kaniovski wrote: Bernardo: this is not quite what I am looking for, Let the data be: y,i,j 1,AUT,BEL 2,AUT,GER 3,BEL,GER then the dummies sould look like: y,i,j,d_AUT,d_BEL,d_GER 1,AUT,BEL,1,1,0 2,AUT,GER,1,0,1 3,BEL,GER,0,1,1 I can generate the

Re: [R] Dummy (factor) based on a pair of variables

2009-04-18 Thread Jason Morgan
On 2009.04.18 15:58:30, Jason Morgan wrote: On 2009.04.18 13:52:35, Serguei Kaniovski wrote: I can generate the above dummies but can this design be imputed in a reg. model directly? Oops, I apologize for not reading the whole question. Can you do the following: lm(y ~ I(ifelse(df$i==AUT

Re: [R] The R Inferno

2009-01-10 Thread Jason Morgan
User) __ 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, reproducible code. -- ~ Jason Morgan