[R] Different information between correlation and frequency of a seasonal time series

2013-10-27 Thread Stefano Sofia
Dear R users, I have a seasonal rainfall time series x. acf(x) shows correlation at lags 4, 8 and 12, but frequency(x) is 1. I would have expected frequency equal to 4. Moreover, acf(diff(aso,4,1)) shows a correlation only at lag 4, while acf(diff(aso,4,2)) shows a correlation at lags 4 and 8 (an

Re: [R] dunnett test questions

2013-10-27 Thread Achim Zeileis
On Sun, 27 Oct 2013, Imran Akbar wrote: Hi, I've got a data set with a control group and a number of experimental groups, that have unequal sample sizes, and am measuring the number of people in each that respond yes or no. I'd like to use a dunnett test in R, where the syntax is supposed to

Re: [R] plotting multiple variables

2013-10-27 Thread Jim Lemon
On 10/28/2013 04:53 PM, Hansol Yu wrote: When my data has 50 rows, 100 columns and class column. How can I plot this data and show classes? Do I have to draw 100 lines? Hi Hansol, I doubt that anyone on the R help list really knows the answer to your question unless your lecturer is one of us.

[R] plotting multiple variables

2013-10-27 Thread Hansol Yu
When my data has 50 rows, 100 columns and class column. How can I plot this data and show classes? Do I have to draw 100 lines? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] Code Book from SPSS Data

2013-10-27 Thread jwd
On Sun, 27 Oct 2013 14:37:27 -0700 (PDT) Peter Maclean wrote: It's not fully clear what you need, but, as I very vaguely recall, the code book in SPSS provided labels for what are called levels in "factors" in R, which are categorical variables. Try: "??categorical" at the prompt for starters.

Re: [R] Problems with lme random slope+intercept model

2013-10-27 Thread Ben Bolker
anord zooekol.lu.se> writes: > > Dear all, > I'm trying to fit a model on ecological data in which I have measured a few > biotic and abiotic factors over the course of a few days in several > individuals. Specifically, I'm interested in modelling y ~ x1, with x2, x3, > and 'factor' as independ

Re: [R] numeric data being interpreted as a factor -trouble with reading data into a dataframe in R

2013-10-27 Thread Jeff Newmiller
No data came through (I don't think "CSV" is one of the approved file types.) You probably have some odd characters somewhere in the data. Try adding the argument stringsAsFactors=FALSE to the read.csv call before converting the troublesome column.. Converting factors to numeric converts the int

Re: [R] nls function error

2013-10-27 Thread Rolf Turner
On 10/28/13 00:10, Hansol Yu wrote: data(Boston, package='MASS') y <- Boston$nox x <- Boston$dis nls(y~ A + B * exp(C * x), start=list(A=1, B=1, C=1)) Error in nls(y ~ A + B * exp(C * x), start = list(A = 1, B = 1, C = 1), : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 I

Re: [R] R-help Digest, Vol 128, Issue 29

2013-10-27 Thread Robert Rigby
Re: Heteroscedasticity and mgcv. (Collin Lynch) The GAMLSS package can model heterogeneity in the scale parameter (e.g. standard deviastion) [and also heterogeity in skewness and kurtosis parameters].of the response variable distribution. For parametric models a generalized likelihood ratio test

[R] nls function error

2013-10-27 Thread Hansol Yu
data(Boston, package='MASS') y <- Boston$nox x <- Boston$dis nls(y~ A + B * exp(C * x), start=list(A=1, B=1, C=1)) Error in nls(y ~ A + B * exp(C * x), start = list(A = 1, B = 1, C = 1), : step factor 0.000488281 reduced below 'minFactor' of 0.000976562 I don't know how to fix this error. I th

[R] numeric data being interpreted as a factor -trouble with reading data into a dataframe in R

2013-10-27 Thread Bill
Hello. trying to do one of the simplest actions -read in data into R. I don't know why the FBfollowers column is being read as a factor and also if I use as.numeric on it, it looks really strange and actually complety alters the data. I am attaching the data set here called ddd.csv I used data=read

Re: [R] About K-means Clustering

2013-10-27 Thread pragya panchal
Hi, Thank You for the reply of my previous question. I have another doubt regarding Hclust. In Hierarchical clustering how can i find that what are the members at each clustering level? Please send me a reply soon. Thank You. On Sat, Oct 26, 2013 at 9:56 PM, wrote: > Hi, > I need some answer

[R] dunnett test questions

2013-10-27 Thread Imran Akbar
Hi, I've got a data set with a control group and a number of experimental groups, that have unequal sample sizes, and am measuring the number of people in each that respond yes or no. I'd like to use a dunnett test in R, where the syntax is supposed to be like: library(multcomp) test.dunnett=

Re: [R] Code Book from SPSS Data

2013-10-27 Thread Peter Maclean
I am trying again. I do not have SPSS and I would like to create a code book in a data frame format using R. I am reading the SPSS file using "memisc package". The script is: #Data for 2012 available at http://www.ark.ac.uk/nilt/datasets/ #Also attached ibrary(memisc) ## change the working direct

[R] Use correlation matrix to get values for a new data frame

2013-10-27 Thread tobias schlager
Dear all, i am a bit stuck with a problem right now. Specifically, I have a correlation matrix, and a dataframe on which I want to project the values. However, I am not sure how I can do this. Here the calculations I made, I wanted to get a matrix that shows the values for each of the combina

Re: [R] Split a data.frame

2013-10-27 Thread arun
Hi, DF$Col2 # [1] a e b b a b c e b a c c e e a c d c c e #Levels: a b c d e "b" is not found in any of the "Grs".  Also Gr3 is not presnt in DF$Col2 So, I am not sure whether this works for you. indx <- 1+ 2*DF$Col2 %in% Gr1 + 4*DF$Col2 %in% Gr2 + 8*DF$Col2 %in% Gr3  indx <- indx[indx>1]  spli

[R] How to avoid this warning message

2013-10-27 Thread Alaios
Dear all, I would like to ask you how I can avoid this warning I am getting when I am writing some results in a text file 5: In write.table(x = cor(t(collectMean_UL), t(collectMean_DL)),  ... :   appending column names to file the code that saves to the file look like:  write(x="TEMPERATURE",f

[R] Split a data.frame

2013-10-27 Thread Christofer Bogaso
Hi again, Let say I have following DF: DF <- structure(list(Col1 = 1:20, Col2 = structure(c(1L, 5L, 2L, 2L, 1L, 2L, 3L, 5L, 2L, 1L, 3L, 3L, 5L, 5L, 1L, 3L, 4L, 3L, 3L, 5L ), .Label = c("a", "b", "c", "d", "e"), class = "factor")), .Names = c("Col1", "Col2"), row.names = c(NA, -20L), class = "data

Re: [R] apply question

2013-10-27 Thread Andras Farkas
not homework, but thanks for the hint! Andras On Sunday, October 27, 2013 7:51 AM, Patrick Burns wrote: Homework?  A hint is: ?diff Pat On 27/10/2013 11:37, Andras Farkas wrote: > Dear All, > > please help with the following problem: > > I have > > > t <-seq(0,24,by=6) > a <-600 > g <-0

Re: [R] apply question

2013-10-27 Thread Patrick Burns
Homework? A hint is: ?diff Pat On 27/10/2013 11:37, Andras Farkas wrote: Dear All, please help with the following problem: I have t <-seq(0,24,by=6) a <-600 g <-0.05 b <-a*exp(-g*t) I would like to establish a vector called z (for example) based on b where the results are calculated as

Re: [R] how well *new data* fit a pre-computed model

2013-10-27 Thread Pavlos Pavlidis
Here is a link to a plot that illustrates the question: bio.lmu.de/~pavlidis/pg1.pdf the question is how to evaluate whether the blue points fit the curve well enough. The curve has been produced from the black points best pavlos On Sun, Oct 27, 2013 at 1:30 PM, Pavlos Pavlidis wrote: > Hi all

[R] apply question

2013-10-27 Thread Andras Farkas
Dear All, please help with the following problem: I have t <-seq(0,24,by=6) a <-600 g <-0.05 b <-a*exp(-g*t)    I would like to establish a vector called z (for example) based on b where the results are calculated as : z <-c(a-b[1],b[1]-b[2],b[2]-b[3],b[3]-b[4],b[4]-b[5]) so the results are:

[R] how well *new data* fit a pre-computed model

2013-10-27 Thread Pavlos Pavlidis
Hi all, I have fitted polynomial models to a bunch of data (time-course analysis). The experiment is "the expression value of gene A under condition K over time". The data points that have been used to fit the model are about 200 (dataset A). Furthermore I have a few data (dataset B; about 10 point

Re: [R] add a color band

2013-10-27 Thread Jim Lemon
On 10/27/2013 08:39 AM, Alaios wrote: Hi Jim and thanks for your answer... I might be too tired with my new born or just exhausted. I am attaching for everyone a small data snipset that you can load load("DataToPlotAsImage.Rdata") require(plotrix) browser() test<-data # this transforms the val

Re: [R] About K-means Clustering

2013-10-27 Thread Rui Barradas
Hello, Both questions are answered in the help page for kmeans(). At an R prompt type ?kmeans and read the section Value. The membership is given by 'cluster' and the centers by 'centers'. See also the very first example. Hope this helps, Rui Barradas Em 27-10-2013 01:56, pragya.pancha..

Re: [R] Code Book from SPSS Data

2013-10-27 Thread Barry Rowlingson
On Sat, Oct 26, 2013 at 9:37 PM, Peter Maclean wrote: > I do not have SPSS and I would like to create a code book in a data frame > format using R. > #How could I extract a codebook (without Summary statistics for printing)? This isn't that clear because I don't think 'codebook' is something w