Displaying 16 results from an estimated 16 matches for "col8".
Did you mean:
col
2012 Oct 18
4
speeding read.table
...sing 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-14 0.0000E...
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
...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" (because t...
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
...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(x)))
}
dn...
2008 Feb 21
2
column name handling and long labels
Hi,
I have two loosely related questions which could make
my live again a bit easier:
1) Is there a simple way to select a range of columns
in a data frame using column names?
I am thinking of something like mydf[1,"col4":"col8"]
2) I have a data frame with many columns and they all
have short variable names which is good in most cases
but sometimes it would be nice to have also a longer
descriptive name / label attached to the variable
which could then be used for printing and latex
output. Has anybody come up with...
2012 Nov 23
6
Summary statistics for matrix columns
Hi,
is there a way I can calculate a summary statistics for a columns matrix
let say we have this matrix
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
2012 Feb 15
1
neuralnet problem
...ad.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 : +33 (0...
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
...> #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
>...
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
...e(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 a vector
>
> tempLT50_ACC=...
2006 Mar 28
1
weights in glm (PR#8720)
...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 (because of taking zeros in regression).
Could you tel...
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
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:05 217...
2004 Apr 03
1
Re: R-help Digest, Vol 14, Issue 3
...ake 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 8,3...
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