Re: [R] cumulative sum by group and under some criteria

2013-02-24 Thread arun
Hello,  head(d,2) #  m1 n1 x1 y1 Fmm  Fnn Qm   Qn  term1_p0 term1_p1 #1  2  2  0  0   0 0.00  1 1.00 0.8145062   0.4096 #2  2  2  0  1   0 0.64  1 0.36 0.0857375   0.2048 Assuming that `x` and `y` are 'x1` and `y1`, where is 'c11` in the dataset? res2<-do.call(rbind,lapply(lst1[lapply(lst1,nrow)!

[R] quesion about SS of ANOVA

2013-02-24 Thread meng
Hi all: I have a quesion about ANOVA: Is SS(Sum of Square) of a specific factor constant with the number of factors changing? dat1 includes one factor g1,and g1's SS is called SS_g1_dat1. dat2 includes two factors g1,g2,and g1's SS is called SS_g1_dat2. My quesion is: Is SS_g1_dat1 equals to S

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Ulrike Grömping
Gabor, thanks for your patient answers! I have adjusted the Rtools path to consist of both the bin and the gcc-4.6.3 sub directory, and that did it. The R path was set by R as it was, presumably because this is only a 32-bit system, and everything worked with that R path, as there is also an R

Re: [R] colors to pie chart.

2013-02-24 Thread Nicole Ford
Ah perfect thanks. :))) ~Nicole Ford Ph.D. Student Graduate Assistant/ Instructor Department of Government and International Affairs University of South Florida office: SOC 012M e: nmhi...@mail.usf.edu http://gia.usf.edu/student/nford/ Sent from my iPhone On Feb 25, 2013, at 2:04 AM, PIKAL Petr

Re: [R] colors to pie chart.

2013-02-24 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Nicole Ford > Sent: Monday, February 25, 2013 7:57 AM > To: R help > Subject: [R] colors to pie chart. > > hello, all. > > i am trying something new and am stuck. i typical

Re: [R] assign index to colnames(matrix)

2013-02-24 Thread PIKAL Petr
Hi What language are you comming from? colnames(ScoutRSM.mat) <- paste("X", 1:39, sep="") Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Prew, Paul > Sent: Saturday, February 23, 2013 1:35 AM > To: r-help@r-p

[R] colors to pie chart.

2013-02-24 Thread Nicole Ford
hello, all. i am trying something new and am stuck. i typically go with whatever colors the pie function pops out, but i would like to customize it. please find below a sample dataset. ##TVs per household. TVs <- factor(c(rep("0", 1), rep("1", 16), rep("2", 14), rep("3", 12), rep("4", 3), rep

Re: [R] package ReadImages

2013-02-24 Thread PIKAL Petr
Thanks to all. For the time being due to urgency I will stay with a copy of R 2.15.x with which ReadImages works. It is simplest solution which I can adopt immediately without much additional effort. However I will need to elaborate another solution in future, for which I will consider various

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-24 Thread PIKAL Petr
Hi > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Rich Shepard > Sent: Friday, February 22, 2013 11:33 PM > To: r-help@r-project.org > Subject: Re: [R] Controlling Order of Panels in Lattice Trellis Plots > > On Fri, 22 Feb

[R] How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?

2013-02-24 Thread Anna Zakrisson
Hi, I have a data set with two continous variables that I want to plot MEANS (I am not intrerested in median values) on a double-y graph. I also have 2 factors. I want the factor combinations plotted in different panes. Dummy dataset: mydata <- data.frame(factor1 = factor(rep(LETTERS[1:3], eac

Re: [R] Controlling Order of Panels in Lattice Trellis Plots

2013-02-24 Thread Patrick Connolly
On Fri, 22-Feb-2013 at 11:02AM -0800, Rich Shepard wrote: |> With multiple panels in a lattice trellis plot the sequence is, for |> example, 1, 10, 11, 12, 2, 3, 4. I want the sequence to be 1, 2, 3, 4, 10, |> 11, 12. |> |> Reading ?strip.default and the appropriate section in the Lattice boo

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Gabor Grothendieck
On Sun, Feb 24, 2013 at 6:34 PM, Ulrike Grömping wrote: > Am 24.02.2013 23:50, schrieb Gabor Grothendieck: > >> On Sun, Feb 24, 2013 at 4:00 PM, Ulrike Grömping >> wrote: >>> >>> Dear helpeRs, >>> >>> on my Windows 7 laptop, I have problems getting R CMD check to work. I >>> believe it did work c

Re: [R] R software installation problem

2013-02-24 Thread Sarah Goslee
Hi Andy, This list strips most forms of attachments. Instead, you need to tell us what OS and version you're using, how you're trying to install, and what's going wrong, in detail. Sarah On Sun, Feb 24, 2013 at 8:58 AM, Andy Siddaway wrote: > Dear R-help, > > Please could I have some quick gui

Re: [R] cumulative sum by group and under some criteria

2013-02-24 Thread Zjoanna
Thanks! Solved. I have another question. This is your code for calculated the cumulative sum. how to modify the code if I want to add another criterion for calculating the cumulative sum: x[,11:12][x$Qm<=c11,]<-cumsum(x[,9:10][x$Qm<=c11,]); # cumsum if x$Qm<=c11 & x>2 x[,13:14][x$Qn<=c12,]<-cums

[R] R software installation problem

2013-02-24 Thread Andy Siddaway
Dear R-help, Please could I have some quick guidance on what I'm doing wrong when trying to instal R software? (I have read the R-FAQs and instructions, and watched youtube instructional videos on installing R, but they didn't help) I've attached screenshots to hopefully make what I've done clear

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Ulrike Grömping
Am 24.02.2013 23:50, schrieb Gabor Grothendieck: On Sun, Feb 24, 2013 at 4:00 PM, Ulrike Grömping wrote: Dear helpeRs, on my Windows 7 laptop, I have problems getting R CMD check to work. I believe it did work completely before, but I am not sure. Yesterday it almost worked, except for the te

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread David Winsemius
On Feb 24, 2013, at 1:29 PM, Martin Batholdy wrote: > Dear Miguel, > > thanks! > But I actually do not have two vectors but just a correlation coefficient and > want to get the p value. > As far as I can see it, cor.test only works when having raw data pairs or am > I missing something? > >

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Gabor Grothendieck
On Sun, Feb 24, 2013 at 4:00 PM, Ulrike Grömping wrote: > Dear helpeRs, > > on my Windows 7 laptop, I have problems getting R CMD check to work. I > believe it did work completely before, but I am not sure. > > Yesterday it almost worked, except for the tests: These were aborted because > of a com

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Elaine Kuo
Hello sorry that I did not make the letter clearly stated. Now I have 21 boxplots (No. 1, No. 2No. 21 from the left to the right)(lattice). I want the first two (No. 1 and 2) to become red and the rest (No. 3 to No. 21) to become blue. (rep will make No. 1 and 2, No. 9 and 10, No. 17 and 18,

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Jeff Newmiller
If you do reinstall, I recommend not using administrator mode at all. Let the install program trigger a request for password to enable the install, and run R as a normal user, doing your work in subdirectories of your Documents directory. Running as administrator is like heroin... any problems i

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Ulrike Grömping
Am 24.02.2013 22:14, schrieb Duncan Murdoch: On 13-02-24 4:00 PM, Ulrike Grömping wrote: Dear helpeRs, on my Windows 7 laptop, I have problems getting R CMD check to work. I believe it did work completely before, but I am not sure. Yesterday it almost worked, except for the tests: These were a

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread Martin Batholdy
Dear Miguel, thanks! But I actually do not have two vectors but just a correlation coefficient and want to get the p value. As far as I can see it, cor.test only works when having raw data pairs or am I missing something? On Feb 24, 2013, at 22:24 , Miguel Manese wrote: > Hi Martin, > > See

Re: [R] compute p/t value from pearson r and n

2013-02-24 Thread Miguel Manese
Hi Martin, See ?cor.test example(cor.test) Regards, - Jon On Mon, Feb 25, 2013 at 5:06 AM, Martin Batholdy wrote: > Hi, > > is there a predefined function that computes the p- or t-value > based on a correlation coefficient and its sample size? > > > thanks! > > ___

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Duncan Murdoch
On 13-02-24 4:00 PM, Ulrike Grömping wrote: Dear helpeRs, on my Windows 7 laptop, I have problems getting R CMD check to work. I believe it did work completely before, but I am not sure. Yesterday it almost worked, except for the tests: These were aborted because of a complaint that the tempora

[R] compute p/t value from pearson r and n

2013-02-24 Thread Martin Batholdy
Hi, is there a predefined function that computes the p- or t-value based on a correlation coefficient and its sample size? thanks! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:

[R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-24 Thread Ulrike Grömping
Dear helpeRs, on my Windows 7 laptop, I have problems getting R CMD check to work. I believe it did work completely before, but I am not sure. Yesterday it almost worked, except for the tests: These were aborted because of a complaint that the temporary directory wasn't available. I played w

Re: [R] How to define variables as categorical using Gower with Daisy

2013-02-24 Thread Peter Ehlers
On 2013-02-24 07:57, Joanna Papakonstantinou wrote: I am using the iris dataset that contains mixed variables (some columns are numeric and some categorical). iris Sepal.Length Sepal.Width Petal.Length Petal.WidthSpecies 15.1 3.5 1.4 0.2 setos

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Peter Ehlers
On 2013-02-24 03:50, Elaine Kuo wrote: Hello Thank you for the advice on vector. I found a previous mail on this issue and pasted it below. Now here comes a different scenario. I have more than 20 boxplots and just wanted the first two from the left to be red and the rest to be blue. Please kin

Re: [R] one sample t-test

2013-02-24 Thread Jim Lemon
On 02/25/2013 06:04 AM, Karsten Rincke wrote: Hello, I am reasoning about a question concerning the t-test for one sample. My data includes 150 values (mean 10.07) which I want to compare to mu=9. A tow-sided t-test yields t.test(data,mu=9) One Sample t-test data: data t = 3.0099, d

[R] Use of the newdata parameter in the predict.coxph function

2013-02-24 Thread Steve Einbender
Hello, I've executed the following predict.coxph function to enable prediction for new variable values (error is included). *predict(cox_out,newdata=data.frame(Meter3.Value=100.001, Meter4.Value=200.001,Meter5.Value=300.001,Meter10.Value= 400.001,type="expected")) Error in model.frame.default(dat

[R] How to define variables as categorical using Gower with Daisy

2013-02-24 Thread Joanna Papakonstantinou
> I am using the iris dataset that contains mixed variables (some columns are > numeric and some categorical). > > > iris > Sepal.Length Sepal.Width Petal.Length Petal.WidthSpecies > 15.1 3.5 1.4 0.2 setosa > 24.9 3.0

[R] one sample t-test

2013-02-24 Thread Karsten Rincke
Hello, I am reasoning about a question concerning the t-test for one sample. My data includes 150 values (mean 10.07) which I want to compare to mu=9. A tow-sided t-test yields > t.test(data,mu=9) One Sample t-test data: data t = 3.0099, df = 149, p-value = 0.00307 alternative hypothesi

Re: [R] data.frame and import to xlsx

2013-02-24 Thread jim holtman
If you are going to use XLConnect to read in the .xlsx files, I would suggest that you might want to convert them to .xls files. Run a performance test to see if you have a problem. I use a lot of EXCEL files and have found that the performance (in both time and memory) is much better with .xls f

Re: [R] data.frame and import to xlsx

2013-02-24 Thread Rui Barradas
Hello, Please keep the discussion on the list, the odds of you getting more and better answers is greater. (I'm Cceing to R-Help.) What package is read_spectra in? What type of object does it return? Can you post the result of the following instruction? str(SP) # paste the output of this.

Re: [R] Selecting First Incidence from Longitudinal Data

2013-02-24 Thread Frank Harrell
I think we need a task view on longitudinal data manipulation. There are so many approaches to this - people need help navigating them. I tend to stay away from the lapply-split methods as they don't look quite as clean and may take longer to run. The aggregate function uses too much data frame

[R] BA.plot with logarithmic axes (MethComp)

2013-02-24 Thread Thorsten Raff
Dear R-helpers, I am trying to plot a Bland-Altman-Plot using the BA.plot function from the package MethComp. While there is a function to transform the values for analysis as shown in the snippet below, I would like to have logarithmic axes for display as well. The usual log = 'xy' does not wo

Re: [R] data.frame and import to xlsx

2013-02-24 Thread Rui Barradas
Hello, I'm not sure I understand the question. You want to import an xlxs sheet to R? Look at package XLConnect. The vignette explains several ways of doing it. And as for the frame, the import functions in XLConnect (and the several read.* functions in base R) return data.frames so the proble

Re: [R] filling an array

2013-02-24 Thread Ista Zahn
Hi, The usual way is I <- rep(c(0, v), each=10) Best, Ista On Sat, Feb 23, 2013 at 10:56 PM, Jannetta Steyn wrote: > Hi All > > I'm just wondering if there is a quick way of filling a way with the > following. > > I want to declare array I with a specific length and then alternatively > fill

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Elaine Kuo
Hello Thank you for the advice on vector. I found a previous mail on this issue and pasted it below. Now here comes a different scenario. I have more than 20 boxplots and just wanted the first two from the left to be red and the rest to be blue. Please kindly advise how to code the color without

Re: [R] locating boxplot in bwplot (lattice)

2013-02-24 Thread Andrés Aragón Martínez
Hi Elaine, In your dataset create a vector with the order in which you want appear the levels, then use that vector in the argument "reorder". Andrés AM El 24/02/2013, a las 00:59, Elaine Kuo escribió: > Hello, > > I tried to manipulate the order of boxplots using the "reorder" below and

Re: [R] Error in J[time] : invalid subscript type 'closure'

2013-02-24 Thread Berend Hasselman
On 24-02-2013, at 10:59, Jannetta Steyn wrote: > Hi All > > I have Googled the message Error in J[time] : invalid subscript type > 'closure', but can't quite make sense from the results that I get. What > does it mean? > > I'm trying to access an element in an array. Here is a short bit of cod

[R] Error in J[time] : invalid subscript type 'closure'

2013-02-24 Thread Jannetta Steyn
Hi All I have Googled the message Error in J[time] : invalid subscript type 'closure', but can't quite make sense from the results that I get. What does it mean? I'm trying to access an element in an array. Here is a short bit of code that produces the error: s_fun <- function(parms,time) { w

Re: [R] filling an array

2013-02-24 Thread Jannetta Steyn
Hi Josh and Jim Thanks for your help. With what you have given me I came up with v<-14 I<-c(rep(c(rep(0,10),rep(v,10)),10)) Which should give me more or less what I want. Many thanks Jannetta On 24 February 2013 04:13, Joshua Wiley wrote: > Hi Jannetta, > > Try this: > > rep(c(0, v), each =

Re: [R] Fitting this data with a gaussian would be great

2013-02-24 Thread Achim Zeileis
On Sat, 23 Feb 2013, Bryan Hanson wrote: Fortune candidate? Added R-Forge now... :-) thx, Z I hear the landlord is hell, but the company good. Bryan I've already got an apartment reserved for me in one of Pat Burns's "R Inferno" levels, and I don't want to descend even further. Best, Ber

Re: [R] Selecting First Incidence from Longitudinal Data

2013-02-24 Thread arun
Hi, I am not sure why you are getting different results.  I couldn't reproduce your problem. dat1<- read.table(text=" ID    COMPL  SEX  HEREDITY 1    0  1  2 1    0  1  2 1    3  1  2 2    0  0  1 2    1  0  1 2    2  0  1 2    2  0