[R] define colors for groups in lattice xyplot

2010-09-02 Thread geert . demeyer
Dear all, Lattice provides automatic coloring for subgroups on each panel by the simple use of a groups statement. For an application I want to change these colors to a predifined set. This works well using a panel function in stead of the default as long as there are only points in the graphs.

Re: [R] calculate monthly mean

2010-09-02 Thread Joshua Wiley
Hello Ali, It looks to me like you have two questions: 1) the error you get from scatterplot3d 2) how to calculate the monthly mean. If you could provide some sample data that would make it a lot easier to help you understand why the error occurred and what to do about it. For now, maybe this wi

Re: [R] Power analysis

2010-09-02 Thread Dennis Murphy
Hi: Just to add to the discussion, see the following article by Russell Lenth on the subject: http://www.stat.uiowa.edu/techrep/tr378.pdf Dennis On Thu, Sep 2, 2010 at 3:59 PM, C Peng wrote: > > Agree with Greg's point. In fact it does not make logical sense in many > cases. Similar to the us

[R] running an exe in the background

2010-09-02 Thread raje...@cse.iitm.ac.in
Hi, I'd like to be able to run a .exe in the background whenever library(package-x) is called. Is this possible? ~Aks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] NLS equation self starting non linear

2010-09-02 Thread Peter Ehlers
On 2010-09-02 22:32, Gabor Grothendieck wrote: On Thu, Sep 2, 2010 at 7:39 PM, Marlin Keith Cox wrote: This data are kilojoules of energy that are consumed in starving fish over a time period (Days). The KJ reach a lower asymptote and level off and I would like to use a non-linear plot to show

Re: [R] "pairs" with same xlim and ylim scale

2010-09-02 Thread Shi, Tao
Hi Dejian, Thanks for the reply! I finally found the problem. It is actually in the "panel.cor" function. Adding "..." in the function and "text" call fixed everything. Best, ...Tao - Original Message > From: Dejian Zhao > To: r-help@r-project.org > Sent: Thu, September 2, 2

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Peter Ehlers
On 2010-09-02 22:16, Jocelyn Paine wrote: Greg, thanks for the suggestion. That's useful to know for future work. It's not so good in this case, because I'm making the plots for a colleague who doesn't know R, and it would be a bother for me to have to send him several files and him reassemble th

Re: [R] NLS equation self starting non linear

2010-09-02 Thread Gabor Grothendieck
On Thu, Sep 2, 2010 at 7:39 PM, Marlin Keith Cox wrote: > This data are kilojoules of energy that are consumed in starving fish over a > time period (Days).  The KJ reach a lower asymptote and level off and I > would like to use a non-linear plot to show this leveling off.  The data are > noisy an

Re: [R] date

2010-09-02 Thread Linlin Yan
try to use difftime() instead of as.difftime(). On Thu, Sep 2, 2010 at 10:32 PM, Dunia Scheid wrote: > Hello all, > > I've 2 strings that representing the start and end values of a date and > time. > For example, > time1 <- c("21/04/2005","23/05/2005","11/04/2005") > time2 <- c("15/07/2009", "03/

[R] specify the covariance matrix for random effect

2010-09-02 Thread Qiu, Weiyu
Hi, I'm doing a generalized linear mixed model, and I currently use an R function called "glmm". However, in this function they use a standard normal distribution for the random effect, which doesn't satisfy my case, i.e. my random effect also follows a normal distribution, but observations ov

[R] calculate monthly mean

2010-09-02 Thread Ali Alsamawi
Hello group Im trying to plot 3d with scatterplot packages, i got error say " length(color) must be equal length(x) or 1 " may data has dimensions (lon,lat,lev,time) ,the time in month i want to calculate the monthly mean for the time how can i make that , is there any function doi

Re: [R] Power analysis

2010-09-02 Thread C Peng
Agree with Greg's point. In fact it does not make logical sense in many cases. Similar to the use of the "statistically unreliable" reliability measure Cronbach's alpha in some non-statistical fields. -- View this message in context: http://r.789695.n4.nabble.com/Power-analysis-tp2524729p2524907

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Peter Ehlers
On 2010-08-31 13:49, Greg Snow wrote: Look at the pairs2 function in the TeachingDemos package, this lets you produce smaller portions of the total scatterplot matrix at a time (with bigger plots), you could print the smaller portions then assemble the full matrix on a large wall, or just use

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Jocelyn Paine
Greg, thanks for the suggestion. That's useful to know for future work. It's not so good in this case, because I'm making the plots for a colleague who doesn't know R, and it would be a bother for me to have to send him several files and him reassemble them. What I did was to use pairs.panels,

Re: [R] Making plots in big scatterplot matrix large enough to see

2010-09-02 Thread Jocelyn Paine
William, Thanks. I adapted your example by doing: library(psych) pdf(file="myfile.pdf",width=30,height=30) pairs.panels(data,gap=0) dev.off() The R part worked. I could see it doing so when I replaced the call to 'pdf' by windows(width=30,height=30) . The remaining problem was that A

Re: [R] "pairs" with same xlim and ylim scale

2010-09-02 Thread Dejian Zhao
When "pairs" draws plots, "lower.panel" invokes "f.xy". Maybe there is something in "f.xy" incompatible with "pairs". You can read the code of "pairs" to see what happens. "pairs" has two methods, as you can see in the help message (?pairs). According to your code, pairs is supposed to invoke

Re: [R] testing for emptyenv

2010-09-02 Thread Peng, C
Is there a complete list of these very handy and power functions in the base R? -- View this message in context: http://r.789695.n4.nabble.com/testing-for-emptyenv-tp2432922p2525031.html Sent from the R help mailing list archive at Nabble.com. __ R-he

Re: [R] specify the covariance matrix for random effect

2010-09-02 Thread Ben Bolker
Qiu, Weiyu ualberta.ca> writes: > > Hi, > > I'm doing a generalized linear mixed model, and I currently use an > R function called "glmm". However, in > this function they use a standard normal distribution for the random > effect, which doesn't satisfy my > case, i.e. my random effect also

[R] NLS equation self starting non linear

2010-09-02 Thread Marlin Keith Cox
This data are kilojoules of energy that are consumed in starving fish over a time period (Days). The KJ reach a lower asymptote and level off and I would like to use a non-linear plot to show this leveling off. The data are noisy and the sample sizes not the largest. I have tried selfstarting we

[R] specify the covariance matrix for random effect

2010-09-02 Thread Qiu, Weiyu
Hi, I'm doing a generalized linear mixed model, and I currently use an R function called "glmm". However, in this function they use a standard normal distribution for the random effect, which doesn't satisfy my case, i.e. my random effect also follows a normal distribution, but observations ov

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Ted Harding
On 02-Sep-10 18:01:55, Greg Snow wrote: > Just to add to Ted's addition to my response. I think you are moving > towards better understanding (and your misunderstandings are common), > but to further clarify: > [Wise words about P(A|B), P(B|A), P-values, etc., snipped] > > The real tricky bit abo

Re: [R] Ordering data by variable

2010-09-02 Thread Greg Snow
Suggestion: use the power of R. If x and y are independent then sorting y based on x is meaningless. If sorting y based on x is meaningful, then they are not independent. Trying to force non-independent things to pretend that they are independent just causes future headaches. Part of the grea

Re: [R] Power analysis

2010-09-02 Thread Greg Snow
Be happy, don't do post-hoc power analyses. The standard "post-hoc power analysis" is actually counterproductive. It is much better to just create confidence intervals. Or give a better description/justification showing that your case is not the standard/worse than useless version. -- Gregor

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread Bond, Stephen
Totally agreed. I made a mistake in calling the categorization a GAM. If we apply a step function to the continuous age we get a limited range ordinal variable. Categorizing is creating several binary variables from the continuous (with treatment contrasts). Stephen B -Original Message

Re: [R] How using the weights argument in nls2?

2010-09-02 Thread Gabor Grothendieck
On Thu, Sep 2, 2010 at 11:09 AM, Ivan Allaman wrote: > > Good morning gentlemen! > > How using a weighted model in nls2? Values with the nls are logical since > values with nls2 are not. I believe that this discrepancy is due to I did > not include the weights argument in nls2. > Just to follow u

Re: [R] Ordering data by variable

2010-09-02 Thread Joshua Wiley
Hi Marcio, Is this what you want? x <- c(2,6,8,8,1) y <- c(1,6,3,5,4) o <- order(x) # If you want each vector order by x x[o] y[o] You can also use sort(), but then each vector would be sorted by itself, not both by x. HTH, Josh On Thu, Sep 2, 2010 at 1:48 PM, Mestat wrote: > > Hi listers,

[R] Ordering data by variable

2010-09-02 Thread Mestat
Hi listers, I could order a data that like this: x<-c(2,6,8,8,1) y<-c(1,6,3,5,4) o<-order(x) frame<-rbind(x,y)[,o] But, I would like to know if there is a way to order my data without setting up a data frame. I would like to keep independent vectors x and y. Any suggestions? Thanks in advance, Mar

Re: [R] Simultaneous equations

2010-09-02 Thread benhartley903
Thanks Peter Actually I should have specified. These are not actually the functions I ultimately want to solve can't be rearranged explicitly and substituted. I do need a way to solve simultaneously. Ben -- View this message in context: http://r.789695.n4.nabble.com/Simultaneous-equations-tp25

[R] Power analysis

2010-09-02 Thread Lewis G. Dean
I am aware this is fairly simple, but is currently driving me mad! Could someone help me out with conducting a post-hoc power analysis on a Wilcoxon test. I am being driven slightly mad by some conflicting advice! Thanks in advance, Lewis [[alternative HTML version deleted]]

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread Frank Harrell
On Thu, 2 Sep 2010, stephenb wrote: sorry to bump in late, but I am doing similar things now and was browsing. IMHO anova is not appropriate here. it applies when the richer model has p more variables than the simpler model. this is not the case here. the competing models use different variabl

Re: [R] Simultaneous equations

2010-09-02 Thread Peter Dalgaard
On 09/02/2010 09:25 PM, benhartley903 wrote: > > Dear all, > I am relatively new to R and have had some difficulty in understanding the > user manual for a package that I have downloaded to evaluate non-linear > simultaneous equations. > The package is called systemfit. > Does anyone have any e

Re: [R] Simultaneous equations

2010-09-02 Thread Berend Hasselman
benhartley903 wrote: > > Dear all, > I am relatively new to R and have had some difficulty in understanding the > user manual for a package that I have downloaded to evaluate non-linear > simultaneous equations. > The package is called systemfit. > Does anyone have any experience of this pack

[R] Simultaneous equations

2010-09-02 Thread benhartley903
Dear all, I am relatively new to R and have had some difficulty in understanding the user manual for a package that I have downloaded to evaluate non-linear simultaneous equations. The package is called systemfit. Does anyone have any experience of this package? What I am trying to do is solve

Re: [R] Why is vector assignment in R recreates the entire vector ?

2010-09-02 Thread Norm Matloff
Tal wrote: > A friend recently brought to my attention that vector assignment actually > recreates the entire vector on which the assignment is performed. ... I brought this up in r-devel a few months ago. You can read my posting, and the various replies, at http://www.mail-archive.com/r-de...

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread Bert Gunter
Perhaps even more to the point, "covariate adjustment" and "classification" should not be separate. One should fit the appropriate model that does both. -- Bert On Thu, Sep 2, 2010 at 11:34 AM, Ben Bolker wrote: > On 10-09-02 02:26 PM, James Nead wrote: >> My apologies - I have made this more co

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Greg Snow
David, The original poster was not looking at distributions and testing distributions, I referred to the distribution of the p-value to help them understand (in reference to the paper mentioned). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.o

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread Ben Bolker
On 10-09-02 02:26 PM, James Nead wrote: > My apologies - I have made this more confusing than it needs to be. > > I had microarray gene expression data which I want to use for > classification algorithms. However, I want to 'adjust' the data for > all confounding factors (such as age, experiment nu

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread James Nead
My apologies - I have made this more confusing than it needs to be. I had microarray gene expression data which I want to use for classification algorithms. However, I want to 'adjust' the data for all confounding factors (such as age, experiment number etc.), before I could use the data as inpu

Re: [R] general question on binomial test / sign test

2010-09-02 Thread David Winsemius
On Sep 2, 2010, at 2:01 PM, Greg Snow wrote: The real tricky bit about hypothesis testing is that we compute a single p-value, a single observation from a distribution, and based on that try to decide if the process that produced that observation is a uniform distribution or something e

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread Ben Bolker
James Nead yahoo.com> writes: > > Sorry, forgot to mention that the processed data will be used as input for a > classification algorithm. So, I need to adjust for known effects before I can > use the data. > > > I am trying to adjust raw data for both fixed and mixed effects. > The data tha

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Greg Snow
Just to add to Ted's addition to my response. I think you are moving towards better understanding (and your misunderstandings are common), but to further clarify: First, make sure that you understand that the probability of A given B, p(A|B), is different from the probability of B given A, p(B

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread James Nead
Sorry, forgot to mention that the processed data will be used as input for a classification algorithm. So, I need to adjust for known effects before I can use the data. thanks From: Bert Gunter Cc: r-help@r-project.org Sent: Thu, September 2, 2010 12:46:13

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread James Nead
Hi Bert, Thanks for the reply. Height, was just as an example. Perhaps, I should have said 'x' instead of height. Essentially, what I want to do is adjust the data for known effects. After I've done this, I can conduct further analysis on the data (for example, if another variable 'z' has an

Re: [R] Linear models (lme4) - basic question

2010-09-02 Thread Bert Gunter
Why should height be a random effect? I suspect you may need a tutorial on what a random effect in a mixed model is. I see no obvious reason why one would cluster on height. Perhaps if you clarify, it may become obvious either what your concerns are (and that your model is correct) or that you mis

Re: [R] Help on glm and optim

2010-09-02 Thread Zhang,Yanwei
Thomas, Thanks a lot. This solves my problem. Wayne (Yanwei) Zhang Statistical Research >CNA -Original Message- From: Thomas Lumley [mailto:tlum...@u.washington.edu] Sent: Thursday, September 02, 2010 11:24 AM To: Zhang,Yanwei Cc: r-help@r-project.org Subject: Re: [R] Help on glm an

Re: [R] Help on glm and optim

2010-09-02 Thread Thomas Lumley
On Thu, 2 Sep 2010, Zhang,Yanwei wrote: Dear all, I'm trying to use the "optim" function to replicate the results from the "glm" using an example from the help page of "glm", but I could not get the "optim" function to work. Would you please point out where I did wrong? Thanks a lot. The fo

[R] Linear models (lme4) - basic question

2010-09-02 Thread James Nead
Hi, Sorry for a basic questions on linear models. I am trying to adjust raw data for both fixed and mixed effects. The data that I output should account for these effects, so that I can use the adjusted data for further analysis. For example, if I have the blood sugar levels for 30 patients,

[R] Help on glm and optim

2010-09-02 Thread Zhang,Yanwei
Dear all, I'm trying to use the "optim" function to replicate the results from the "glm" using an example from the help page of "glm", but I could not get the "optim" function to work. Would you please point out where I did wrong? Thanks a lot. The following is the code: # Step 1: fit the glm

[R] How using the weights argument in nls2?

2010-09-02 Thread Ivan Allaman
Good morning gentlemen! How using a weighted model in nls2? Values with the nls are logical since values with nls2 are not. I believe that this discrepancy is due to I did not include the weights argument in nls2. Here's an example: MOISTURE <- c(28.41640, 28.47340, 29.05821, 28.52201, 30.9

Re: [R] date

2010-09-02 Thread Ista Zahn
Hi Dunia, You need to convert the character strings to Dates. time1 <- as.Date(c("21/04/2005","23/05/2005","11/04/2005"), "%d/%m/%Y") time2 <- as.Date(c("15/07/2009", "03/06/2008", "15/10/2005"), "%d/%m/%Y") time2-time1 Best, Ista On Thu, Sep 2, 2010 at 10:32 AM, Dunia Scheid wrote: > Hello a

Re: [R] Comparing COXPH models, one with age as a continuous variable, one with age as a three-level factor

2010-09-02 Thread stephenb
sorry to bump in late, but I am doing similar things now and was browsing. IMHO anova is not appropriate here. it applies when the richer model has p more variables than the simpler model. this is not the case here. the competing models use different variables. you are left with IC. by transfo

Re: [R] star models

2010-09-02 Thread Setlhare Lekgatlhamang
Hi, Have you gotten help on this? Lexi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of ma...@unizar.es Sent: Saturday, August 28, 2010 5:08 PM To: r-help@r-project.org Subject: [R] star models Hi, I am traying to implement an STAR

[R] date

2010-09-02 Thread Dunia Scheid
Hello all, I've 2 strings that representing the start and end values of a date and time. For example, time1 <- c("21/04/2005","23/05/2005","11/04/2005") time2 <- c("15/07/2009", "03/06/2008", "15/10/2005") as.difftime(time1,time2) Time differences in secs [1] NA NA NA attr(,"tzone") [1] "" How ca

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Kay Cichini
..i'd like to add that i actually wanted to test the location of differences of paired samples coming from an non-normal asymetric distribution. the alternative hypothesis was that negative differences are more often than in 0.5 of all cases. thus i tested (x=nr.diff.under.0,n=all.diffs,0.5,altern

Re: [R] lower triangle of the correlation matrix with xtable

2010-09-02 Thread Olga Lyashevska
if I try as.dist I get the following error: On Thu, 2010-09-02 at 09:57 -0400, Sarah Goslee wrote: > > mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) > > as.dist(cor(mydata)) >x1 x2 > x2 -0.5960396 > x3 0.3973597 0.500 print(xtable(as.dist(cor(mydata)),digits=3)

Re: [R] lower triangle of the correlation matrix with xtable

2010-09-02 Thread Steve_Friedman
try lower.tri and see ??lower.tri Steve Friedman Ph. D. Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 steve_fried...@nps.gov Office (305) 224 - 4282 Fax (305) 224 - 4147

Re: [R] Kolmogorov Smirnov p-values

2010-09-02 Thread Samsiddhi Bhattacharjee
oops sorryreally careless. thanks ! On Thu, Sep 2, 2010 at 10:03 AM, Alain Guillet wrote: >  Hi, > > Are you sure you don't want to do   ks.test(y, punif, min=0, max=1, > alternative="greater") instead of what you tried? > > Alain > > > On 02-Sep-10 15:52, Samsiddhi Bhattacharjee wrote: >> >>

Re: [R] Kolmogorov Smirnov p-values

2010-09-02 Thread Alain Guillet
Hi, Are you sure you don't want to do ks.test(y, punif, min=0, max=1, alternative="greater") instead of what you tried? Alain On 02-Sep-10 15:52, Samsiddhi Bhattacharjee wrote: ks.test(y, runif, min=0, max=1, alternative="greater") -- Alain Guillet Statistician and Computer Scientist

Re: [R] lower triangle of the correlation matrix with xtable

2010-09-02 Thread Sarah Goslee
Like this? > mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) > as.dist(cor(mydata)) x1 x2 x2 -0.5960396 x3 0.3973597 0.500 Sarah On Thu, Sep 2, 2010 at 9:51 AM, Olga Lyashevska wrote: > Dear all, > > mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) > cor(

[R] Kolmogorov Smirnov p-values

2010-09-02 Thread Samsiddhi Bhattacharjee
I was just testing out ks.test() > y <- runif(1, min=0, max=1) > ks.test(y, runif, min=0, max=1, alternative="greater") One-sample Kolmogorov-Smirnov test data: y D^+ = 0.9761, p-value < 2.2e-16 alternative hypothesis: the CDF of x lies above the null hypothesis > It seems that eve

[R] lower triangle of the correlation matrix with xtable

2010-09-02 Thread Olga Lyashevska
Dear all, mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) cor(mydata) x1 x2x3 x1 1.000 -0.5960396 0.3973597 x2 -0.5960396 1.000 0.500 x3 0.3973597 0.500 1.000 I wonder if it is possible to fill only lower triangle of this correlation matr

Re: [R] how to represent error bar in a plot legend?

2010-09-02 Thread Josef . Kardos
I think I found a simple solution, although it requires some tinkering to find the x,y coordinates of the plot region to place the text... barplot ( ) text(x= 2.9, y = 0.43, srt=90, labels = "H", cex = 1.5, col="blue") #srt rotates the "H" character, so that it resembles an error bar text(x=3.5

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Kay Cecil Cichini
thanks a lot for the elaborations. your explanations clearly brought to me that either binom.test(1,1,0.5,"two-sided") or binom.test(0,1,0.5) giving a p-value of 1 simply indicate i have abolutely no ensurance to reject H0. considering binom.test(0,1,0.5,alternative="greater") and binom.

Re: [R] nlme formula from model specification

2010-09-02 Thread Mikkel Meyer Andersen
Dear Thierry, Thanks for the quick answer. I'm moving this to r-sig-mixed-models (but also posting on r-help to notify). I reserved "Mixed-effects models in S and S-PLUS" by Pinheiro and Bates, New York : Springer, 2000. Do you know any other good references? Cheers, Mikkel. 2010/9/2 ONKELINX,

Re: [R] Is there any package or function perform stepwise variable selection under GEE method?

2010-09-02 Thread Frank Harrell
The absence of stepwise methods works to your advantage, as these yield invalid statistical inference and inflated regression coefficients. Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University On Thu, 2

[R] how to cluster vectors of factors

2010-09-02 Thread tueken
Hello all I wonder what can i use to cluster vectors which composed of several factors. lets say around 30 different factors compose a vector, and if the factor is present then it encoded as 1, if not presented then it will be encoded as 0. I was thinking of using hierarchical clustering, as i kn

Re: [R] nlme formula from model specification

2010-09-02 Thread ONKELINX, Thierry
Dear Mikkel, You need to do some reading on terminology. In your model the fixed effects are channel 1, 2 and 3. samplenumber is a random effect and the error term is an error term The model you described has the notation below. You do not need to create the grouped data structure. lme(channel0

Re: [R] Error: could not find function "ad.test"

2010-09-02 Thread Dennis Murphy
Hi: One option to search for functions in R is to download the sos package: library(sos) findFn('Anderson-Darling') On my system (Win 7), it found 51 matches. The two likeliest packages are nortest and ADGofTest. To answer your question, nortest still exists on CRAN. I can't comment on Ubuntu, b

Re: [R] reshape to wide format takes extremely long

2010-09-02 Thread Dennis Murphy
Hi: Thanks, David and Thierry. I knew what I did was inefficient, but I'm not very adept with cast() yet. Thanks for the lesson! The time is less than half without the fun = mean statement, too. On my system, the timing of David's call was 2.06 s elapsed; with Thierry's, it was 4.88 s. Both big im

[R] nlme formula from model specification

2010-09-02 Thread Mikkel Meyer Andersen
Dear R-community, I'm analysing some noise using the nlme-package. I'm writing in order to get my usage of lme verified. In practise, a number of samples have been processed by a machine measuring the same signal at four different channels. I want to model the noise. I have taken the noise (the s

Re: [R] R graphics: Add labels to stacked bar chart

2010-09-02 Thread Jim Lemon
On 09/02/2010 08:50 PM, Jens Oldeland wrote: > ... > I am looking for a way to add labels, i.e. absolute values, into a > stacked bar chart using the basic plot functions of R. The labels > should be inside the stacked bars. barpos<-barplot(height,beside = FALSE, horiz=TRUE,col = c(2, 3)) librar

[R] Error: could not find function "ad.test"

2010-09-02 Thread DrCJones
Hi, I'm trying to run an anderson-darling test for normality on a given variable 'Y': ad.test(Y) I think I need the 'nortest' package, but since it does not appear in any of the Ubuntu repositories for 2.10.1, I am wondering if it goes by the name of something else now? Thanks -- View this me

Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-02 Thread raje...@cse.iitm.ac.in
It is dependent on another dll but it did not give compilation errors. It seemed to link fine at that point. Why does it have a problem at this stage? From: "Duncan Murdoch" To: raje...@cse.iitm.ac.in Cc: "r-help" Sent: Thursday, September 2, 2010 4:05:14 PM Subject: Re: [R] R CMD check P

[R] draw a graph of the semi-partial R-squared /CAH

2010-09-02 Thread Yan leeuw
Dear r-help, I am using CAH. I would cut my dendogram. What is the command in R that allows draw a graph of the semi-partial R-squared ? Best Regards [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-02 Thread Duncan Murdoch
On 02/09/2010 6:46 AM, raje...@cse.iitm.ac.in wrote: It is dependent on another dll but it did not give compilation errors. It seemed to link fine at that point. Why does it have a problem at this stage? Windows needs to be able to find the other DLL at load time. It will find it if it's in t

[R] R graphics: Add labels to stacked bar chart

2010-09-02 Thread Jens Oldeland
Hi, I am looking for a way to add labels, i.e. absolute values, into a stacked bar chart using the basic plot functions of R. The labels should be inside the stacked bars. For example, ### I have this dataset height = cbind(x = c(465, 91) / 465 * 100, y = c(840, 200)

Re: [R] reshape to wide format takes extremely long

2010-09-02 Thread carslaw
picking up on Thierry's example, I don't think you need any function because you are just reshaping (not aggregating). Therefore: bigtab2 <- cast(data = big, study + subject + cycle + day ~type, value = "obs") > head(bigtab2) study subject cycle day ALB ALP ALT AST 1 1 1 1 1

Re: [R] R CMD check Package(Windows): Error in inDL(x, as.logical(local), as.logical(now), ...) :

2010-09-02 Thread Duncan Murdoch
On 02/09/2010 2:29 AM, raje...@cse.iitm.ac.in wrote: Hi, I've built my own package in windows and when I run R CMD check Package-Name I get, * install options are ' --no-html' * installing *source* package 'AceTest' ... ** libs making DLL ... g++ ...etc. installing to ... done ** R ** p

Re: [R] reshape to wide format takes extremely long

2010-09-02 Thread ONKELINX, Thierry
Dear Dennis, cast() is in this case much faster. > system.time(bigtab <- ddply(big, .(study, subject, cycle, day), function(x) xtabs(obs ~ type, data = x))) user system elapsed 35.360.12 35.53 > system.time(bigtab2 <- cast(data = big, study + subject + cycle + day ~type, value = "ob

Re: [R] how to represent error bar in a plot legend?

2010-09-02 Thread Jim Lemon
On 09/02/2010 04:56 AM, josef.kar...@phila.gov wrote: I have a simple barplot of 4 mean values, each mean value has an associated 95% confidence interval drawn on the plot as an error bar. I want to make a legend on the plot that uses the error bar symbol, and explains "95% C.I." How do I show th

Re: [R] reshape to wide format takes extremely long

2010-09-02 Thread Dennis Murphy
Hi: I did the following test using function ddply() in the plyr package on a toy data frame with 5 observations using five studies, 20 subjects per study, 25 cycles per subject, five days per cycle and four observations by type per day. No date-time variable was included. # Test data frame bi

[R] Is there any package or function perform stepwise variable selection under GEE method?

2010-09-02 Thread 黃敏慈
Hi , I use library(gee),library(geepack),library(yags) perform GEE data analysis , but all of them cannot do variable selection! Both step and stepAIC can do variable selection based on AIC criterion under linear regression and glm, but they cannot work when model is based on GEE. I want to a

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Ted Harding
You state: "in reverse the p-value of 1 says that i can 100% sure that the estimate of 0.5 is true". This is where your logic about significance tests goes wrong. The general logic of a singificance test is that a test statistic (say T) is chosen such that large values represent a discrepancy betw

[R] Using library and lib.loc

2010-09-02 Thread omerle
Hi, I didn't find any post on this subject so I ll ask you some advices. Let's say that I have two library trees. Number 1 is the default R library tree on path1 Number 2 is another library tree on a server with all packages on path2. When I set library(aaMI,lib.loc=paths2) it loads the package

Re: [R] ggplot2 multiple group barchart

2010-09-02 Thread ONKELINX, Thierry
Dear Greg, First convert your data.frame to a long format using melt(). Then use ddply() to calculate the averages. Once you get at this point is should be rather straightforward. library (ggplot2) v1 <- c(1,2,3,3,4) v2 <- c(4,3,1,1,9) v3 <- c(3,5,7,2,9) gender <- c("m","f","m","f","f") d.da

Re: [R] R code changes to crap

2010-09-02 Thread Ted Harding
On 02-Sep-10 07:16:54, khush wrote: > Hi, > > I am using vim to edit my files...I do not know what has been > pressed by me as my R code get converted to such a crap... > > %PDF-1.4 > %<81>â<81>ã<81>Ï<81>Ó\r > 1 0 obj > << > /CreationDate (D:20100902122215) > /ModDate (D:20100902122215)

Re: [R] general question on binomial test / sign test

2010-09-02 Thread Kay Cecil Cichini
i test the null that the coin is fair (p(succ) = p(fail) = 0.5) with one trail and get a p-value of 1. actually i want to proof the alternative H that the estimate is different from 0.5, what certainly can not be aproven here. but in reverse the p-value of 1 says that i can 100% sure that t

Re: [R] R code changes to crap

2010-09-02 Thread peter dalgaard
On Sep 2, 2010, at 09:16 , khush wrote: > Hi, > > I am using vim to edit my files...I do not know what has been pressed by me > as my R code get converted to such a crap... > > %PDF-1.4 > %<81>â<81>ã<81>Ï<81>Ó\r > 1 0 obj > << > /CreationDate (D:20100902122215) > /ModDate (D:2010090212

[R] reshape to wide format takes extremely long

2010-09-02 Thread Coen van Hasselt
Hello, I have a data.frame with the following format: > head(clin2) Study Subject Type Obs Cycle Day Date Time 1 A001101 10108 ALB 44.098 1 2004-03-11 14:26 2 A001101 10108 ALP 95.098 1 2004-03-11 14:26 3 A001101 10108 ALT 61.098 1 2004-0

[R] R code changes to crap

2010-09-02 Thread khush ........
Hi, I am using vim to edit my files...I do not know what has been pressed by me as my R code get converted to such a crap... %PDF-1.4 %<81>â<81>ã<81>Ï<81>Ó\r 1 0 obj << /CreationDate (D:20100902122215) /ModDate (D:20100902122215) /Title (R Graphics Output) /Producer (R 2.11.1) /Creator (R) how t

Re: [R] Cross Spectrum Analysis

2010-09-02 Thread aftar
Hi I'm sorry, but I don't think that coherence is the same as the cross spectrum. People use coherence since it is much easier to deal with. I know how by using R to plot and calculate the coherence and phase, but what I didn't know is how to calculate the cross spectrum by using R. Regards Aft

Re: [R] How to generate integers from uniform distribution with fixed mean

2010-09-02 Thread Barry Rowlingson
On Thu, Sep 2, 2010 at 7:17 AM, Yi wrote: > Hi, folks, > > runif (n,min,max) is the typical code for generate R.V from uniform dist. > > But what if we need to fix the mean as 20, and we want the values to be > integers only? It's not clear what you want. Uniformly random integers with expected

Re: [R] "pairs" with same xlim and ylim scale

2010-09-02 Thread Shi, Tao
Hi Dejian, You're right on this! Do you know how to pass those two argument into lower.panel? Thanks! ...Tao From: Dejian Zhao To: r-help@r-project.org Sent: Tue, August 31, 2010 6:10:16 PM Subject: Re: [R] "pairs" with same xlim and ylim scale I think you

[R] using R's svd from outside R

2010-09-02 Thread Ralf Goertz
Hi, I have to compute the singular value decomposition of rather large matrices. My test matrix is 10558 by 4255 and it takes about three minutes in R to decompose on a 64bit quadruple core linux machine. (R is running svd in parallel, all four cores are at their maximum load while doing this.) I