search for: col7

Displaying 20 results from an estimated 21 matches for "col7".

Did you mean: col
2012 Oct 18
4
speeding read.table
...ile into R using read.table. The file consists of 100 tables, each of which is headed by two lines of characters. The first of these lines is: TABLE NO. 1 The second is a list of column headers. For example: TABLE NO. 1 COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 1.0010E+05 0.0000E+00 1.0000E+00 1.0000E+03 -1.0000E+00 1.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.0010E+05 1.0001E+01 1.0000E+00 1.0000E+03 -1.0000E+00 1.0000E+00 2.2737E-14 -2.2737E...
2013 Jan 03
5
splitting matrices
Dear useRs, i want to split a matrix having 1116rows and 12 columns. i want to split that matrix into 36 small matrices each having 12 columns and 31 rows. The big matrix should be splitted row wise. which means that the first small matrix should copy values which are in first 31 rows and 12 columns of the big matrix. similarly 2nd small matrix should contain values from 32nd to 63rd row of the
2005 May 02
4
"apply" question
...ulate (1) the number of values in each row of columns 6-10 that were NA??s (2) the sum of all values on columns 1-5 for which there were no missing values in the corresponding cells of columns 6-10. Example: (let??s call the data frame "data") Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 1 2 5 2 3 NA 5 NA 1 4 3 1 4 5 2 6 NA 4 NA 1 The result would then be (for the first row) (1) "There were 2 NA??s in columns 6-10." (2) The mean of Columns 1-5 was 2+2+3=7" (be...
2011 Aug 25
2
replicate lines of data frame
...ge values in the first 2 columns. I am trying to figure out how to accomplish this. I think that I need to use rep(my.df, each=6) but it does not quite work. This is the sample data frame "col1" "col2" "col3" "col4" "col5" "col6" "col7" foo bar 1 blah blah blah blah foo bar 2 blah blah blah blah foo bar 3 blah blah blah blah ...... ...... I need to change it into this: "col1" "col2" "col3" "col4" "col5" "c...
2013 Jan 02
4
list of matrices
dear useRs, i have a list containing 16 matrices. i want to calculate the column mean of each of them. i tried >sr <- lapply(s,function(x) colMeans(x, na.rm=TRUE)) but i am getting the following error >Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric can it be done in any other way? and why i am getting this error?? thanks in advance.. elisa [[alternative
2016 Dec 20
2
colnames for data.frame could be greatly improved
...quot;, round(sum(gc()[,2])/1024, 3), "\n") #GB = 0.397 colnames(DF) = NULL system.time(nm1<-colnames(DF, FALSE)) # user system elapsed # 22.158 0.299 22.498 print(nm1) #[1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" ### restart R colnames <- function (x, do.NULL = TRUE, prefix = "col") { if (is.data.frame(x)) { nm <- names(x) if (do.NULL || !is.null(nm)) return(nm) else return(paste0(prefix, seq_along(...
2012 Nov 23
6
Summary statistics for matrix columns
...rix x <- matrix(sample(1:8000),nrow=100) colnames(x)<- paste("Col",1:ncol(x),sep="") if I used summary summary(x) i get the output for each column but I need the output to be in matrix with rownames and all the columns beside it this how I want it Col76 Col77 Min. : 7 39 1st Qu. : 1846 1630 Median : 3631 3376 Mean : 3804 3617 Sd : 3rd Qu.: 5772 5544 IQR : Max. : 7952 7779 Is there an easy way? Thanks -- View this message in context: http://r.789695.n4...
2012 Feb 15
1
neuralnet problem
...;- read.table('in.dat') colnames(All) <- paste('col',1:ncol(All),sep='') # Val = target values, matrix of n rows X 3 columns Val <- read.table('target.dat') # create dataframe dt <- data.frame(Val,All) nn <- neuralnet(Val ~ col1+col2+col3+col4+col5+col6+col7+col8,data=dt) Is there someone kind enough to correct my code ? Many many thanks in advance !! Luc ---------------------------------------------------------------- Dr. Luc Moulinier, Laboratoire de Biologie et G?nomique Int?gratives IGBMC 1, rue Laurent Fries 67 404 ILLKIRCH Cedex Phone : +...
2005 Mar 23
2
replace values in a matrix subject to boolean condition
Hi everybody! I am sorry to bother you with a question so simple but I think there might be a better solution: I have a matrix of size 360x501 where I want to check the value of each 5th column of each row and replace it (and the 6th, 7th, 8th column) by zero if the value is less than 1000. I have written a double loop to do that but that requires a lot of time. Is there a faster way to
2016 Dec 27
0
colnames for data.frame could be greatly improved
..., "\n") > #GB = 0.397 > colnames(DF) = NULL > system.time(nm1<-colnames(DF, FALSE)) > # user system elapsed > # 22.158 0.299 22.498 > print(nm1) > #[1] "col1" "col2" "col3" "col4" "col5" "col6" "col7" "col8" "col9" > > ### restart R > > colnames <- function (x, do.NULL = TRUE, prefix = "col") > { > if (is.data.frame(x)) { > nm <- names(x) > if (do.NULL || !is.null(nm)) > return(nm) > e...
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
..., labels=cutree(hcl,8), col=cutree(hcl,8)) # Change this, but how??? > > col1=rgb(0.164,0.043,0.850) # Set the colors > col2=rgb(0.150,0.306,1.000) > col3=rgb(0.250,0.630,1.000) > col4=rgb(0.450,0.853,1.000) > col5=rgb(0.670,0.973,1.000) > col6=rgb(0.880,1.000,1.000) > col7=rgb(1.000,1.000,0.750) > col8=rgb(1.000,0.880,0.600) > col9=rgb(1.000,0.679,0.450) > col10=rgb(0.970,0.430,0.370) > col11=rgb(0.850,0.150,0.196) > col12=rgb(0.650,0.000,0.130) > colTemperature=c(col1,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12) # Put all colors in...
2011 Jul 27
2
Writing a summary file in R
...gion, column 4 is total reads in general, column 5 is total reads >=1, column 6 is (col4/col5) or the percentage, and at the end I'd like to list 6 more columns based on summary results from summary() function in R. The summary() function will be used to analyze all of the methylation data (col7 from input) for each region (bounded by col2 and col3). For example for chr1 100 159 summary() gives: Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0400 0.0425 0.0450 0.0450 0.0475 0.0500 which is simply the methylation data input into summary() only in the region of chr1 100 159. I kno...
2006 Mar 28
1
weights in glm (PR#8720)
...NA Row10 -0.01267 NA NA NA Col2 0.69283 NA NA NA Col3 0.62603 NA NA NA Col4 0.27695 NA NA NA Col5 0.06056 NA NA NA Col6 -0.19582 NA NA NA Col7 -0.83044 NA NA NA Col8 -1.27914 NA NA NA Col9 -1.93235 NA NA NA Col10 -2.49709 NA NA NA When I omited 'weights=w' above table was filled in with numbers, but the results were wrong (becau...
2006 Nov 30
4
Quicker way of combining vectors into a data.frame
Hi, In a function, I compute 10 (un-named) vectors of reasonable length (4471 in the particular example I have to hand) that I want to combine into a data frame object, that the function will return. This is very slow, so *I'm* doing something wrong if I want it to be quick and efficient, though I'm not sure what the best way to do this would be. I know it is the combining into data
2005 Feb 22
3
Reproducing SAS GLM in R
Hi, I'm still trying to figure out that GLM procedure in SAS. Let's start with the simple example: PROC GLM; MODEL col1 col3 col5 col7 col9 col11 col13 col15 col17 col19 col21 col23 =/nouni; repeated roi 6, ord 2/nom mean; TITLE 'ABDERUS lat ACC 300-500'; That's the same setup that I had in my last email. I have three factors: facSubj,facCond and facRoi. I had this pretty much figured out with three lengthy calls t...
2008 Mar 16
2
How to loop through all the columns in dataframe
...varA + col1*covAB + col5*covAB + col1*col5*varB and so on.. then do it all over again but starting with col2 varA + col2*covAB + col3*covAB + col2*col3*varB varA + col2*covAB + col4*covAB + col2*col4*varB varA + col2*covAB + col5*covAB + col2*col5*varB then col3 then col4 to col7 This is easy to do in Excel but I wonder if there's a way to do it with R This is the dataframe I get while doing a loop with Excel(the values generated could bedifferent).Thanks xd pd td 3.82755E-07 26256108060 0.000315419 5.21641E-07 23111121852 0.000207228 5.19531E-...
2007 Mar 14
0
cannot delete the last column of a dataframe using "[<-" (PR#9565)
...Franches-Mnt 92.5 39.7 5 5 C c C Moutier 85.8 36.5 12 7 D d D Neuveville 76.9 43.5 17 15 E e E > # This works: > sw[6:8] <- list(letters[10:14], NULL, aa=1:5) # delete col7, update 6, append > # But this doesn't: > sw <- sw0 > sw[6:8] <- list(letters[10:14], aa=1:5, NULL) Error in x[[jj]] : subscript out of bounds Best, Hsiu-Khuern. ---------- Version: platform = i486-pc-linux-gnu arch = i486 os = linux-gnu system = i486, linux-gnu status =...
2004 Apr 02
1
convert excell file to text with RODBC package
...'t read the last row of the table excell 2) Don' t take the hours My excell file call prueba4.xls and have the following rows: where prueba4.xls was make in excell (office xp) and have one spreadsheet call "Hoja1", you see each rows of she: D??a Hora col1 col2 col3 col4 col5 col6 col7 col8 15/12/2003 12:14:59 217 2760 8,2 35 79,6 86,4 15/12/2003 12:15:00 217 2764 8,2 35 79,6 86,4 15/12/2003 12:15:01 217 2758 8,3 35 79,6 86,4 15/12/2003 12:15:02 217 2760 8,3 35 79,6 86,4 15/12/2003 12:15:03 217 2755 8,3 35 79,6 86,4 15/12/2003 12:15:04 217 2766 8,3 35 79,6 86,4 15/12/2003 12:15:0...
2004 Apr 03
1
Re: R-help Digest, Vol 14, Issue 3
...#39; t take the hours See below >My excell file call prueba4.xls and have the following rows: >where prueba4.xls was make in excell (office xp) and have one spreadsheet >call "Hoja1", you see each rows of she: >D??a Hora col1 col2 col3 col4 col5 col6 col7 col8 >15/12/2003 12:14:59 217 2760 8,2 35 79,6 86,4 >15/12/2003 12:15:00 217 2764 8,2 35 79,6 86,4 >15/12/2003 12:15:01 217 2758 8,3 35 79,6 86,4 >15/12/2003 12:15:02 217 2760...
2005 Apr 14
4
data manipulation
Hello, my question is about the data handling. I have a data set that is lined as: 4 1 17 1 1 -5.1536 -0.1668 -2.3412 -0.5062 0.9621 0.3640 0.3678 -0.5081 -0.2227 0.8142 -0.0389 -0.0445 -0.0578 -0.1175 -0.1232 0.8673 -0.1033 -0.0796 -0.0341 -0.1716 -0.1801 -0.7014 0.6578 0.5611 4 1 17 2 1 -5.1536 -0.1668 -2.3412 -0.5062 0.9621 0.3640 0.3678 -0.5081 -0.2227 0.8142 -0.0389 -0.0445