[R] repeating a loop

2011-11-07 Thread Amit Patel
Hi I have implented boxplots in my script to create box plots BoxplotsCheck - readline(prompt = Would you like to create boxplots for any Feature? (y/n):)   if (BoxplotsCheck  == y){     BoxplotsFeature - readline(prompt = Which Feature would you like to create a Boxplot for?:)    

[R] Help with plotting plsr loadings

2011-06-08 Thread Amit Patel
Hi I am attempting to do a loadings plot from a plsr object. I have managed to do this using the gasoline data that comes with the pls package. However when I conduct this on my dataset i get the following error message. plot(BHPLS1, loadings, comps = 1:2, legendpos = topleft, labels =

[R] Help with Memory Problems (cannot allocate vector of size)

2011-05-18 Thread Amit Patel
While doing pls I found the following problem BHPLS1 - plsr(GroupingList ~ PCIList, ncomp = 10, data = PLSdata, jackknife = FALSE, validation = LOO) when not enabling jackknife the command works fine, but when trying to enable jackknife i get the following error. BHPLS1 -

[R] Help with PLSR with jack knife

2011-05-17 Thread Amit Patel
Hi I am analysing a dataset of 40 samples each with 90,000 intensity measures for various peptides. I am trying to identify the Biomarkers (i.e. most significant peptides). I beleive that PLS with jack knifing, or alternativeley CMV(cross-model-validation) are multivariateThe 40 samples belong

[R] help with PLSR Loadings

2011-05-17 Thread Amit Patel
Hi When I call for the loadings of my plsr using the command, x - loadings(BHPLS1) my loadings contain variable names rather than numbers. str(x) loadings [1:94727, 1:10] -0.00113 -0.03001 -0.00059 -0.00734 -0.02969 ... - attr(*, dimnames)=List of 2 ..$ : chr [1:94727] PCIList1 PCIList2

[R] Fw: Help with PLSR

2011-05-12 Thread Amit Patel
method to identify which of the 94,000 peptides are most important to the variance between groups. Thanks in advance for any help Amit Patel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Help with Amelia

2010-12-22 Thread Amit Patel
Hi I have used the amelia command from the Amelia R package. this gives me a number of imputed datasets. This may be a silly question, but i am not a statistician, but I am not sure how to combine these results to obtain the imputed dataset to usse for further statistical analysis. I have

[R] help with knn.impute

2010-12-22 Thread Amit Patel
Hi I have a dataset from biological data with forty samples whichh relate to four different treatments. Each sample has thousands of values but as usuual contains missing values I want to use knn to imput these missing values. I am doing tthis using knn.impute. Do I need to specify the

[R] Help with amelia

2010-12-22 Thread Amit Patel
Hi I have a dataset from biological data with forty samples whichh relate to four different treatments. Each sample has thousands of values but as usuual contains missing values I want to use EM to imput these missing values. I am doing tthis using amelia. Do I need to specify the various

[R] Help with decimal points

2010-09-07 Thread Amit Patel
Hi I have found a little problem with an R script. I am trying to merge some data and am finding something unusual going on. As shown below I am trying to assign (MatchedValues[Value2,Value]) to (ClusteredData[k,Value]) which are two separate dataframes. 1) By the following command you can

[R] Help with unexpected symbol errors

2010-09-06 Thread Amit Patel
that the script uses because I'm pretty sure the principles i have used are right when running the script i get the above error on line 158 and 159 I am more than happy to provide further information(e.g the dataset) if it helps Many thanks in advance Amit Patel

[R] Fw: Error in rowSums REPOST

2010-08-13 Thread Amit Patel
(FeaturePresenceMatrix) [1] matrix Amit Patel wrote: Hi I am trying to calculate the row sums of a matrix i have created The matrix ( FeaturePresenceMatrix) has been created by 1) Read csv 2) Removing unnecesarry data using [-1:4,] command 3) replacing all the NA values with as.numeric(0) and all others

[R] Error in rowSums

2010-08-12 Thread Amit Patel
Hi I am trying to calculate the row sums of a matrix i have created The matrix ( FeaturePresenceMatrix) has been created by 1) Read csv 2) Removing unnecesarry data using [-1:4,] command 3) replacing all the NA values with as.numeric(0) and all others with as.numeric (1) When I carry out the

[R] Help With ANOVA

2010-07-06 Thread Amit Patel
Hi I needed some help with ANOVA I have a problem with My ANOVA analysis. I have a dataset with a known ANOVA p-value, however I can not seem to re-create it in R. I have created a list (zzzanova) which contains 1)Intensity Values 2)Group Number (6 Different Groups) 3)Sample Number (54 different

[R] Help With ANOVA (corrected please ignore last email)

2010-07-06 Thread Amit Patel
Sorry i had a misprint in the appendix code in the last email Hi I needed some help with ANOVA I have a problem with My ANOVA analysis. I have a dataset with a known ANOVA p-value, however I can not seem to re-create it in R. I have created a list (zzzanova) which contains 1)Intensity Values

[R] Help with Loops

2010-05-13 Thread Amit Patel
Hi I have tried many attempts but cant get the loop right, as I am not a strong programmer. What I am basically trying to do is compare 2 spreadsheets. The problem is that one of them only contain a portion of the overall data (TESTSAMP), where the other has a full datasetFULLSAMP. From the

[R] Help with TukeyHSD

2010-04-15 Thread Amit Patel
Hi I am conducting ANOVA using the aov function I am also conducting TukeyHSD to obtain which of the groups show variance How can I obtain the first three p values from the list below? zzz.aov - aov(Intensity ~ Group, data = zzzanova) TukeyHSD(zzz.aov) Tukey multiple comparisons of means

[R] Help with ANOVA in R

2010-03-09 Thread Amit Patel
Hi I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using

[R] ANOVA questions

2010-03-03 Thread Amit Patel
I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using

[R] Bartlett Test

2010-03-01 Thread Amit Patel
Hi I am trying to conduct a Bartlett test between two groups Samp 1 and Samp 2, both of which are vectors of equal length. I cant find any information on how to do this. Does the data need to be in a structured list. Thanks in advance __

Re: [R] Bartlett Test

2010-03-01 Thread Amit Patel
in bartlett.test.default(xbartlett2, gbartlett24) : there must be at least 2 observations in each group (There are at least 2 unique observations in each group) Thanks in advance - Original Message From: Richardson, Patrick patrick.richard...@vai.org To: Amit Patel amitrh

[R] Help with averaging

2009-07-15 Thread Amit Patel
with even one NA return an NA value. I would prefer not to use for loops as this would slow the script down considerably. #SCRIPT STARTS rm(list=ls()) setwd(C:/Documents and Settings/Amit Patel) #na.strings makes na's readable zz - read.csv(Pr9549_LabelFreeData_ByExperimentAK.csv,strip.white = TRUE

[R] T.test error help

2009-07-09 Thread Amit Patel
Hi I am implementing the t.test in a loop and where the data is the same i get an error message. Error in t.test.default(Samp3, Samp1, na.rm = TRUE, var.equal = FALSE, : data are essentially constant The script i am using is for (i in 1:length(zz[,1])) { Samp1 - zz[i,2:17] Samp2 -

[R] Help with if statements

2009-06-09 Thread Amit Patel
Hi I am trying to create a column in a data frame which gives a sigificane score from 0-7. It should read values from 7 different colums and add 1 to the counter if the value is =0.05. I get an error message saying Error in if (ALLRESULTS[i, 16] = 0.05) significance_count =

[R] help to speed up loops in r

2009-06-08 Thread Amit Patel
Hi i am using a script which involves the following loop. It attempts to reduce a data frame(zz) of 95000 * 41 down to a data frame (averagedreplicates) of 95000 * 21 by averaging the replicate values as you can see in the script below. This script however is very slow (2days). Any suggestions

[R] help wth boxplots

2009-05-26 Thread Amit Patel
Hi I have a vector of data lets call zz (40 values from 4 samples) the data is already in groups, i can even split up the samples using SampA - zz[,2:11] SampB - zz[,12:21] SampC - zz[,22:31] SampV - zz[,32:41] I would like an output that gives me 4 boxplots on one plot one boxplot for the set

[R] Help with loops

2009-05-15 Thread Amit Patel
Hi I am trying to create a loop which averages replicates in my data. The original data has many rows. and consists of 40 column zz[,2:41] plus row headings in zz[,1] I am trying to average each set of values (i.e. zz[1,2:3] averaged and placed in average_value[1,2] and so on. below is my

[R] Fw: Help with loops(corrected question)

2009-05-15 Thread Amit Patel
--- On Fri, 15/5/09, Amit Patel amitrh...@yahoo.co.uk wrote: From: Amit Patel amitrh...@yahoo.co.uk Subject: Help with loops To: r-help@r-project.org Date: Friday, 15 May, 2009, 12:17 PM Hi I am trying to create a loop which averages replicates in my data. The original data has many

[R] Help- extracting values

2009-04-16 Thread Amit Patel
I have csv files imported in r each with 2 columns and many many rows. I have sorted the data in them but want to extract some values. The first column is an ID The second is a p-value ( now sorted in increasing order with NA's last) I want to extract the rows with a p-value of less than 0.05)

[R] Help with ANOVA p-values

2009-04-14 Thread Amit Patel
Hi I have done ANOVA on a dataset (See Below) but am having problems retreiving the p-value. I am assuming that Pr(F) is the p-value but cannot get this value or in fact any other value (e.g. DF) from the summary.Any suggestions?? I have tried sum-summary(zzz.aov) sum$Pr(F) Error: unexpected

[R] Help with Wilcoxon Test

2009-03-02 Thread Amit Patel
Hi I have 2 sets of data that I want to do a Wilcoxon test on. They are of the same dimension. One has 4 zero values and the other has 5. dim(SampA) [1] 1 10 dim(SampV) [1] 1 10 I get the folowing error Error in wilcox.test.default(SampA, SampV, na.rm = TRUE, paired = FALSE, : 'x'

[R] Help with t.test

2009-02-24 Thread Amit Patel
Hi I have managed to do a paired t-test with a data set i have 5 colums of data im dealing with GENE SampA SampB SampC SampVehicle ctcc 859 na145 24 gtcg 45 5 54 69 and so on but they are much larger

[R] Help with t.test

2009-02-23 Thread Amit Patel
Hi I have managed to do a paired t-test with a data set i have 5 colums of data im dealing with GENE              SampA              SampB              SampC                   SampVehicle ctcc                   859  

[R] help with reshaping

2009-02-13 Thread Amit Patel
hi Im having some problems reshaping Ive managed to apply it but have some problems the attached document will explain any help is appreciated __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] help with reshaping (no file attached)

2009-02-13 Thread Amit Patel
MCI A1 A2 A13 A14 A23 A24 A33 A34 Grouped together 56766 N/A N/A N/A N/A N/A N/A N/A N/A N/A 6459 N/A

[R] ANOVA in R

2009-01-29 Thread Amit Patel
Hi I Have a very large dataset that I would like to conduct ANOVA tests on. Im not a very strong programmer so any help would be appreciated. the format is Identifier             A1       A2        B1      B2       C1   C2      Norm1        

[R] t-test

2009-01-29 Thread Amit Patel
When doing the t-test in the below manner will r compare each element of the array with the relevant one. I.e. if i was comparing x and y would (1 and 0) and (1 and 9) be treated as separate variables. Or does it just assume one variable. # test data x - c(1,1.1,1.15,1.2,1.21,1.23) y -

[R] Stacking data

2009-01-29 Thread Amit Patel
Hi I have data in the format below      Age            V1       V2      V3       V4    23646         45190 50333 55166 56271    26174         35535 38227 37911 41184    27723          25691 25712 26144 26398 and would like to sort it as

[R] structure Arrays

2008-12-16 Thread Amit Patel
Hi Does anyone know how I can use structured arrays in r similar to a dataframe in matlab [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] PCA HCA

2008-10-19 Thread Amit Patel
Hi I am attempting PCA and HCA on a dataset The head of the table looks like this VariableSamp1Samp2Samp3 109232 276 352 222 244 I cant stop R from

[R] HI

2008-09-16 Thread Amit Patel
Does anyone know an easy way to convert all the zero values in a imported csv table into NA's [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Dealing with NA's in a data matrix

2007-12-05 Thread Amit Patel
Hi I have a matrix with NA value that I would like to convert these to a value of 0. any suggestions Kind Regards Amit Patel ___ ttp://uk.promotions.yahoo.com/forgood/ [[alternative HTML version deleted

[R] Doing PCA

2007-11-29 Thread Amit Patel
## #scale profiles OGSscaled = rangescale(OGS) #do PCA result = prcomp(OGS, center=FALSE) #obtain scores matrix scores=result$rotation #PC1 vs PC2 plot plot(scores[,1], scores[,2], xlab=PC1, ylab=PC2) #add labels (0.005 and 0.003 offset to aviod obscuring points Kind Regards Amit Patel