[R] About K-means Clustering

2013-10-27 Thread pragya.panchal23
Hi, I need some answers regarding to R. In K-means clustering ,for K=2, How can I find the members of each cluster and What are the coordinates for the cluster centers? Please send me a reply soon. Thank You Sent from Windows Mail [[alternative HTML version deleted]]

Re: [R] Code Book from SPSS Data

2013-10-27 Thread Barry Rowlingson
On Sat, Oct 26, 2013 at 9:37 PM, Peter Maclean pmaclean2...@yahoo.com 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

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,

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

[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

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

[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:

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] 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 pbu...@pburns.seanet.com 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)

[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.frame) DF Now

[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:  

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[indx1]  

[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

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

[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)

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, pragya.pancha...@gmail.com wrote:

[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

[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

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

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] Problems with lme random slope+intercept model

2013-10-27 Thread Ben Bolker
anord andreas.nord at 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

Re: [R] Code Book from SPSS Data

2013-10-27 Thread jwd
On Sun, 27 Oct 2013 14:37:27 -0700 (PDT) Peter Maclean pmaclean2...@yahoo.com 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

[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