[R] R error: Not able to launch R 2.6.2
Hi Everyone, I am having trouble using R. I am not sure what happen but when i start R, i am getting error message Fatal Error: Unable to restore saved data in .RData. -I restarted my pc but still same error -I reinstall R but still same error -deleted the R folder and have a fresh re-install but still same issue. I am not sure what else i can do. any advice? -- View this message in context: http://www.nabble.com/R-error%3A-Not-able-to-launch-R-2.6.2-tp15942837p15942837.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] p-adjust using Benjamn and Hochberg
Hello, I am trying to use the p.adjust function for multiple testing. here is what i have 9997201674_s_at 0.327547396 9998221013_s_at 0.834211067 221685_s_at 0.185099475 I import them from excel have have the gene symbol as well as the pvalue here is the issue pa-p.adjust(pt,method=BH) Error in p[nna] : object is not subsettable In addition: Warning message: In is.na(p) : is.na() applied to non-(list or vector) of type 'closure' adjust-sum(pa0.1) Is there anything i need to change? thanks, k -- View this message in context: http://www.nabble.com/p-adjust-using-Benjamn-and-Hochberg-tp15944523p15944523.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Excel export into R
Hello, I have this in excel Control 543_BU 123_AT 432_CU I want to be able to import to R so that it will read like this c-c(543_BU,123_AT,432_CU) output: [1] 543_BU 123_AT 432_CU This is just a short version. I have about 20 rows and i need a simpler way instead of typing each one. thanks -- View this message in context: http://www.nabble.com/Excel-export-into-R-tp15863252p15863252.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Export csv data
Hi Everyone, Thanks for all the help with the previous queries. Here is what i want to do. i have 2 probesets--calculate all the variance accross all the probesets--filter out probesets that are low so now i ended up with only 1. The 1 is fine but when i export to excel, it is missing the probeID. Here are my code and examples. #calculate the variance across the probesets and plot signals# library(xlsReadWrite) x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) variableprobe #output variance across probesets hist(variableprobe) #displaying histogram of variableprobe write.xls(cbind(data[1], Variance=apply(data[,y],1,var)),file='c://variance.csv') #export as a .csv file. Output: ProbeID Variance 224588_at 21.58257457 ## #filter out low variance and Select 10,000 probesets## data.sub = data.matrix[order(variableprobe,decreasing=TRUE),][1:1,] dim(data.sub) write.table(data.sub, file = c://data_output.csv, sep = ,, col.names = NA) Output: Sample_1_D Sample_1_C Sample_2_D Sample_2_C 1 2.425509867 11.34031409 11.46868531 11.75741478 what i need is this ProbeID Sample_1_D Sample_1_C Sample_2_D Sample_2_C 1224588_at 2.425509867 11.34031409 11.46868531 11.75741478 This is just the short version but there are 1 rows and 140 columns. thanks -- View this message in context: http://www.nabble.com/Export-csv-data-tp15822903p15822903.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] paired or one-sample t-Test
Hi Guys, I am having a real hard time trying to figure out for microarry. Here is my code One-Sample t-Test dim(data.sub) [1] 1 140 ##there are 1 probesets and 140 columns hist(data.sub) ## Histogram. Identify if the probesets are normal distributed q-rnorm(1) ##generate 1 random, normal distributed values qqplot(data.sub,q)) ##Show the plot of the probeset qqline(data.sub,q) ##Show the line going through the plot t.test(data.sub,mu=0) ## One Sample t-test: identify any significant in the probeset When i plot and use histogram, it is showing a nice normal distribution. What i want to do is to use classical paired or one-sample test for each row (1 rows) what is the best way to do this? thanks, kei -- View this message in context: http://www.nabble.com/paired-or-one-sample-t-Test-tp15824910p15824910.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] paired t-Test in R
Keizer_71 wrote: Hi Guys, I am having a real hard time trying to figure out for microarry. Here is my code One-Sample t-Test dim(data.sub) [1] 1 140 ##there are 1 probesets and 140 columns Example of the table in excel sample_drug sample_controlsample_drug sample_controletc 1 .567 .321 .674 .311 hist(data.sub) ## Histogram. Identify if the probesets are normal distributed q-rnorm(1) ##generate 1 random, normal distributed values qqplot(data.sub,q)) ##Show the plot of the probeset qqline(data.sub,q) ##Show the line going through the plot t.test(data.sub,mu=0) ## One Sample t-test: identify any significant in the probeset When i plot and use histogram, it is showing a nice normal distribution. What i want to do is to use classical paired test for each row what is the best way to do this? thanks, kei -- View this message in context: http://www.nabble.com/paired-or-one-sample-t-Test-tp15824910p15830343.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Calculating the t-test for each row
Hi Everyone, I need some simple help. Here are my codes ##will give me 1 probesets data.sub = data.matrix[order(variableprobe,decreasing=TRUE),][1:1,] dim(data.sub) data_output-write.table(data.sub, file = c://data_output.csv, sep = ,, col.names = NA) When i export to excel, it shows me this. This is just a short version. There are 1000 rows and 140 columns Sample_1_D Sample_1_C Sample_2_D Sample_2_C 1 2.425509867 11.34031409 11.46868531 11.75741478 Here is my question: How do create a new row and calculate the t-test so that it will give me the p-value Here is what i am looking for. The p-value is not correct but just an example. It needs to calculate the entire each row. There are 1 rows and 140 columns. thanks Kei Sample_1_D Sample_1_C Sample_2_D Sample_2_Cp-value 1 2.425509867 11.34031409 11.46868531 11.75741478 .0034 I tried something like this. t.test(data.sub,mu=0) I am pretty new to R. I think it is showing me the entire p-value. -- View this message in context: http://www.nabble.com/Calculating-the-t-test-for-each-row-tp15808716p15808716.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Newbie: Incorrect number of dimensions
Here is the structure str(all_differ) num [1:6280, 1:8] 2.22e-16 2.22e-16 2.22e-16 2.22e-16 2.22e-16 ... - attr(*, dimnames)=List of 2 ..$ : NULL ..$ : chr [1:8] rawp Bonferroni Holm Hochberg ... I tried, but it still giving me the same error message Incorrect Dimension probe.names-all_differ[[1]][all_differ[[6280]][,BY]=0.01] Am i using the wrong dimension? thanks, Keizer jholtman wrote: It would be helpful if you provided commented, minimal, self-contained, reproducible code. What does str(all_differ) say? That will tell you the structure of the object that you are trying to work with. On Sat, Mar 1, 2008 at 3:35 AM, Keizer_71 [EMAIL PROTECTED] wrote: dim(data.sub) [1] 1 140 #extracting all differentially express genes## library(multtest) two_side- (1-pt(abs(data.sub),50))*2 diff- mt.rawp2adjp(two_side) all_differ-diff[[1]][37211:1,] all_differ #list of differentially expressed genes## probe.names- + all_differ[[2]][all_differ[[1]][,BY]=0.01] Error in all_differ[[1]][, BY] : incorrect number of dimensions Hi, I am pretty new with R. What i am trying to do is to find all differentially express genes and list of differentially expressed genes. Am i doing something wrong? I keep getting incorrect number of dimensions. How do i find out the correct dimensions? thanks, Keizer -- View this message in context: http://www.nabble.com/Newbie%3A-Incorrect-number-of-dimensions-tp15773090p15773090.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve? Tell me what you want to do, not how you want to do it. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/Newbie%3A-Incorrect-number-of-dimensions-tp15773090p15785977.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Newbie:Export Data into Excel from R
Hi, All i want is to export my list into c: drive and save it as csv file and manually import into Excel. I have the read the article but i am having issues http://pbil.univ-lyon1.fr/library/base/html/write.table.html excel-write.table(probe_gene, file = c:\foo.csv, sep = ,, col.names = NA) Error in file(file, ifelse(append, a, w)) : unable to open connection In addition: Warning message: cannot open file 'c:\foo.csv', reason 'Invalid argument' any suggestions? thanks, chris -- View this message in context: http://www.nabble.com/Newbie%3AExport-Data-into-Excel-from-R-tp15788950p15788950.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Variance Calculation in R
sorry...in step 4-i need the R code to output in this format when i export to excel. ProbeID Variance 1 224588_at 21.58257457 thanks Keizer_71 wrote: Hello, Thanks everyone for helping me with the previous queries. step 1: Here is the orginal data: short sample ProbeID Sample_1_D Sample_1_CSample_2_D Sample_2_C 1 224588_at 2.425509867 11.34031409 11.46868531 11.75741478 step 2: i calculate the variance of the sample using this R code x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) step 3: however, when i type in variableprobe, it gives me this. 1 21.58257457 step 4: I need the code to output this: ProbeID Variance 1 224588_at 21.58257457 What do i need to do to modify the code to give me better description like the one above? thank. Keizer -- View this message in context: http://www.nabble.com/Variance-Calculation-in-R-tp15790621p15790768.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Variance Calculation in R
Hello, Thanks everyone for helping me with the previous queries. step 1: Here is the orginal data: short sample ProbeID Sample_1_D Sample_1_CSample_2_D Sample_2_C 1 224588_at 2.425509867 11.34031409 11.46868531 11.75741478 step 2: i calculate the variance of the sample using this R code x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) step 3: however, when i type in variableprobe, it gives me this. 1 21.58257457 step 4: I need the code to output this: ProbeID Variance 1 224588_at 21.58257457 What do i need to do to modify the code to give me better description like the one above? thank. Keizer -- View this message in context: http://www.nabble.com/Variance-Calculation-in-R-tp15790621p15790621.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Variance Calculation in R
Hi Henrique, It is definitely better, but it doesn't show me the ProbeID which identify the probes name Here was the result when i export to excel with your code. Variance 1 2.425509867 21.6216446425273 any suggestions? thanks, Kei Keizer_71 wrote: Hello, Thanks everyone for helping me with the previous queries. step 1: Here is the orginal data: short sample ProbeID Sample_1_D Sample_1_CSample_2_D Sample_2_C 1 224588_at 2.425509867 11.34031409 11.46868531 11.75741478 step 2: i calculate the variance of the sample using this R code x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) step 3: however, when i type in variableprobe, it gives me this. 1 21.58257457 step 4: I need the code to output this: ProbeID Variance 1 224588_at 21.58257457 What do i need to do to modify the code to give me better description like the one above? thank. Keizer -- View this message in context: http://www.nabble.com/Variance-Calculation-in-R-tp15790621p15791115.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Variance Calculation in R
unfortunately, it is not showing probeID Henrique Dallazuanna wrote: Try this: write.table(cbind(data.matrix[1], Variance = apply(data.matrix[,-1], 1, var)),file='file.xls') On 02/03/2008, Keizer_71 [EMAIL PROTECTED] wrote: sorry...in step 4-i need the R code to output in this format when i export to excel. ProbeID Variance 1224588_at 21.58257457 thanks Keizer_71 wrote: Hello, Thanks everyone for helping me with the previous queries. step 1: Here is the orginal data: short sample ProbeID Sample_1_D Sample_1_CSample_2_D Sample_2_C 1 224588_at 2.425509867 11.34031409 11.46868531 11.75741478 step 2: i calculate the variance of the sample using this R code x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) step 3: however, when i type in variableprobe, it gives me this. 1 21.58257457 step 4: I need the code to output this: ProbeID Variance 1 224588_at 21.58257457 What do i need to do to modify the code to give me better description like the one above? thank. Keizer -- View this message in context: http://www.nabble.com/Variance-Calculation-in-R-tp15790621p15790768.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/Variance-Calculation-in-R-tp15790621p15792364.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] R data Export to Excel
Here is my R Code x-1:2 y-2:141 data.matrix-data.matrix(data[,y])#create data.matrix variableprobe-apply(data.matrix[x,],1,var) variableprobe #output variance across probesets hist(variableprobe) #displaying histogram of variableprobe write.table(cbind(data[1], Variance=apply(data[,y],1,var)),file='c://variance.csv') #export as a .csv file. Output in Excel all in 1 column. ProbeID Variance 1 224588_at 21.5825745738848 How do i separate them so that i can have three columns ProbeID Variance 1 224588_at 21.582. thanks, Kei -- View this message in context: http://www.nabble.com/R-data-Export-to-Excel-tp15796903p15796903.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Newbie: Incorrect number of dimensions
dim(data.sub) [1] 1 140 #extracting all differentially express genes## library(multtest) two_side- (1-pt(abs(data.sub),50))*2 diff- mt.rawp2adjp(two_side) all_differ-diff[[1]][37211:1,] all_differ #list of differentially expressed genes## probe.names- + all_differ[[2]][all_differ[[1]][,BY]=0.01] Error in all_differ[[1]][, BY] : incorrect number of dimensions Hi, I am pretty new with R. What i am trying to do is to find all differentially express genes and list of differentially expressed genes. Am i doing something wrong? I keep getting incorrect number of dimensions. How do i find out the correct dimensions? thanks, Keizer -- View this message in context: http://www.nabble.com/Newbie%3A-Incorrect-number-of-dimensions-tp15773090p15773090.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Newbie: Measuring distance between clusters.
It works! I was banging my head for a week. thank you so much. Bill.Venables wrote: One way to do it is to find the distances between ther centers (= centres in English) of the clusters. dist(kc$centers) It rather depends on how you define distances between clusters, though. There are many possibilities. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keizer_71 Sent: Saturday, 23 February 2008 7:40 PM To: r-help@r-project.org Subject: [R] Newbie: Measuring distance between clusters. Hi, I had 1 genes, and I clustered them using K-means clustering in R. kc-kmeans(data.sub,7) kc n cluster sum of squares by cluster: [1] 60631.76 135886.19 159049.71 101783.27 90040.72 183335.60 158867.81 Available components: [1] cluster centers withinss size I am very new to R. How do i measure the distance between those cluster? I tried I am trying to do a complete linkage z-hclust(kc,method=complete) Error in if (n 2) stop(must have n = 2 objects to cluster) : argument is of length zero thanks. -- View this message in context: http://www.nabble.com/Newbie%3A-Measuring-distance-between-clusters.-tp1 5650066p15650066.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/Newbie%3A-Measuring-distance-between-clusters.-tp15650066p15665075.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Newbie: Where is lmFit function?
thank you. Chuck Cleland wrote: On 2/24/2008 4:02 PM, Keizer_71 wrote: Hi Everyone, I am trying to use lmFit function; however, i cannot find it function anywhere. I have been trying to find the function in Bioconductor and elsewhere. I re-install bioconductor source, update package and update R as well. no luck Is there a command in R where i can just type, and it will download it for me? RSiteSearch(lmFit) shows there is a function with that name in the limma package. -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- View this message in context: http://www.nabble.com/Newbie%3A-Where-is-lmFit-function--tp15669332p15669414.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Newbie: Where is lmFit function?
Hi Everyone, I am trying to use lmFit function; however, i cannot find it function anywhere. I have been trying to find the function in Bioconductor and elsewhere. I re-install bioconductor source, update package and update R as well. no luck Is there a command in R where i can just type, and it will download it for me? -- View this message in context: http://www.nabble.com/Newbie%3A-Where-is-lmFit-function--tp15669332p15669332.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Newbie: Measuring distance between clusters.
Hi, I had 1 genes, and I clustered them using K-means clustering in R. kc-kmeans(data.sub,7) kc n cluster sum of squares by cluster: [1] 60631.76 135886.19 159049.71 101783.27 90040.72 183335.60 158867.81 Available components: [1] cluster centers withinss size I am very new to R. How do i measure the distance between those cluster? I tried I am trying to do a complete linkage z-hclust(kc,method=complete) Error in if (n 2) stop(must have n = 2 objects to cluster) : argument is of length zero thanks. -- View this message in context: http://www.nabble.com/Newbie%3A-Measuring-distance-between-clusters.-tp15650066p15650066.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Calculating the Distance
***creating matrix and calculating variance across probesets x-1:2 y-2:141 data.matrix-data.matrix(data[,y]) variableprobe-apply(data.matrix[x,],1,var) hist(variableprobe) **filter out low variance* data.sub = data.matrix[order(variableprobe,decreasing=TRUE),][1:1,] dim(data.sub) [1] 1 140 summary(data.sub) a few samples: Sample_68_C Sample_69_D Sample_69_C Sample_70_D Sample_70_C Min. : 1.873 Min. : 1.893 Min. : 1.873 Min. : 1.722 Min. : 1.871 1st Qu.: 5.202 1st Qu.: 5.176 1st Qu.: 4.176 1st Qu.: 4.763 1st Qu.: 5.366 Median : 6.559 Median : 6.502 Median : 5.579 Median : 6.208 Median : 6.622 Mean : 6.473 Mean : 6.445 Mean : 5.697 Mean : 6.189 Mean : 6.558 3rd Qu.: 7.738 3rd Qu.: 7.742 3rd Qu.: 6.967 3rd Qu.: 7.547 3rd Qu.: 7.813 Max. :14.953 Max. :14.863 Max. :14.741 Max. :15.102 Max. :14.975 What is the best way to give me me probes only. I am trying to tell R to show me all the probes (10,000). What i want to do is to use the dist function to compute distances between the samples above. This function will take the matrix and computes the distances between the rows of the matrix. I tried dis - dist(t(exprs(data.sub)), method=euclidean) but it is measuring the point by point which is too big. I would like to measure the distances between the rows. thanks!!! -- View this message in context: http://www.nabble.com/Calculating-the-Distance-tp15601307p15601307.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Calculating Distance Metrics using Euclidean
I am trying to calculate the distance metrics, but i keep getting this error. I am very new to R. Am i doing something wrong. dim(data.sub) [1] 1 140 dist(data.sub, method = euclidean, diag = FALSE, upper = FALSE, p = 2) Error: cannot allocate vector of size 781250 Kb In addition: Warning messages: 1: Reached total allocation of 1014Mb: see help(memory.size) 2: Reached total allocation of 1014Mb: see help(memory.size) -- View this message in context: http://www.nabble.com/Calculating-Distance-Metrics-using-Euclidean-tp15560521p15560521.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Calculating the distance samples using distance metics method
***reading in data** data-read.table(microarray.txt,header=T, sep=\t) head(data) dim(data) attach(data) ***creating matrix and calculating variance across probesets x-1:2 y-2:141 data.matrix-data.matrix(data[,y]) variableprobe-apply(data.matrix[x,],1,var) hist(variableprobe) **filter out low variance* data.sub = data.matrix[order(variableprobe,decreasing=TRUE),][1:1,] dim(data.sub) [1] 1 140 What is the best way to calculate the distances between the samples using the euclidean or manhattan distance metrics? any suggestions? -- View this message in context: http://www.nabble.com/Calculating-the-distance-samples-using-distance-metics-method-tp15578860p15578860.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.