similar to: speeding read.table

Displaying 20 results from an estimated 200 matches similar to: "speeding read.table"

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
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
2008 Dec 22
1
questions about read datafile into R
Dear all: I have been thinking to import below one data file (.txt)into R by read.table(..,skip=1, header=T). But How can I deal with the repeated rows of TABLE NO.1 and names of data variables in the middle of this data file. The similar block will be repeated 100 times, here only show 4 of them and within each block, data records also can vary, here only paste 4 rows for example. I appreciate
2008 Dec 22
1
question about read datafile
Dear all: I have been thinking to import below one data file (.txt)into R by read.table(..,skip=1, header=T). But How can I deal with the repeated rows of TABLE NO.1 and names of data variables in the middle of this data file. The similar block will be repeated 100 times, here only show 4 of them and within each block, data records also can vary, here only paste 4 rows for example. I appreciate
2012 Nov 28
3
Speeding reading of large file
R 2.15.1 OS X and Windows Colleagues, I have a file that looks that this: TABLE NO. 1 PTID TIME AMT FORM PERIOD IPRED CWRES EVID CP PRED RES WRES 2.0010E+03 3.9375E-01 5.0000E+03 2.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 2.0010E+03 8.9583E-01
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
2005 May 02
4
"apply" question
Dear R users, I??ve got a simple question but somehow I can??t find the solution: I have a data frame with columns 1-5 containing one set of integer values, and columns 6-10 containing another set of integer values. Columns 6-10 contain NA??s at some places. I now want to calculate (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
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 Mar 28
2
Data extraction
Dear ReXperts, I have the below text file output. I need to extract the T, QC, QO, QO-QC and WT columns for the data between T = 10 and T=150. Any ideas? Thanks in advance. ======================================================================================== 1 D C ---CAT-- T THETA QC QO QO-QC QC/QO WT FSD 8 1 0 1.0000E+01
2012 Feb 16
2
help with e+01 number abbreviations
Dear List, I will appreciate any advice regarding how to convert the following numbers [I got in return by taxondive()] in numeric integers without the e.g. 6.4836e+01 abbreviations. Thank you very much in advance, Gian > taxa_dive Species Delta Delta* Lambda+ Delta+ S Delta+ Nat1 5.0000e+00 6.4836e+01 9.5412e+01 6.7753e+02 8.7398e+01 436.99 Nat2
2008 Sep 05
0
help for color parameter
Dear all: I attached the dataset with this email and post codes as below. My questions is related to the 'col=temp.col' for the line and pch in my code, I have 4 IDs, 10 DIDs and each ID include different DIDs, for example, first ID has 3 DIDs, then the color is the first three colors(black, red, green) in the first plot, but in the second plot, why the color change to pink which is
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
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all, I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4. I don't want to use the heat.colors(n)
2006 Mar 28
1
weights in glm (PR#8720)
Full_Name: Robert Pusz Version: 2.2.1 OS: Windows Submission from: (NULL) (157.25.9.126) Hello, In my opinion something is wrong with 'weights' option in glm. My code is following: ###begin of the code#### cl <- c(5012, 106, 3410, 5655, 1092, 1513, 557, 1351, 3133, 2063, 3257, 4179, 5582, 5900, 8473, 4932, 3463, 5596, 2262, 0, 2638, 1111, 4881, 4211, 6271, 5257, 6926, 6165, 0, 0,
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
2006 Jan 23
4
Converting from a dataset to a single "column"
I have a dataset of 3 ?columns? and 5 ?rows?. temp<-data.frame(col1=c(5,10,14,56,7),col2=c(4,2,8,3,34),col3=c(28,4,52,34,67)) I wish to convert this to a single ?column?, with column 1 on ?top? and column 3 on ?bottom?. i.e. 5 10 14 56 7 4 2 8 3 34 28 4 52 34 67 Are there any functions that do this, and that will work well on much larger datasets (e.g. 1000 rows, 6000 columns)?
2001 Jun 26
5
breaks in hist()
I was using the hist() function to create a frequency table of some network traffic data. The range in values is rather large, from 0 till just under 10e12. Calling hist(x, breaks=c(0,1000,1e6,1e9,1e12),plot=F,freq=T) causes hist() to return : $breaks [1] -1.0000e+05 1.0100e+05 1.1000e+06 1.0001e+09 1.0000e+12 Is this recalculation of the breaks by hist() intended? Maarten van Gelder.
2008 Dec 29
0
Serial Correlation Test for Short Time Series
Hello, Are there any R functions available for performing a serial correlation test for short time series (e.g, series having between 10-14 observations)? Many thanks! Isabella R. Ghement, Ph.D. Ghement Statistical Consulting Company 301-7031 Blundell Road, Richmond, B.C., Canada, V6Y 1J5 Tel: 604-767-1250 Fax: 604-270-3922 E-mail: isabella at ghement.ca Web: www.ghement.ca -----Original
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello, colnames seems to be not optimized well for data.frame. It escapes processing for data.frame in if (is.data.frame(x) && do.NULL) return(names(x)) but only when do.NULL true. This makes huge difference when do.NULL false. Minimal edit to `colnames`: if (is.data.frame(x)) { nm <- names(x) if (do.NULL || !is.null(nm)) return(nm) else
2007 Jan 06
2
Get column value of col1 .. col10
Hi, I have a table with column name like col1, col2, col3, col4 ... col10. In rails, after I get the instance of the class, I would like to use a for loop to retrieve values from these columns and put them into a hash. The hash will be used for another find call. Is that possible? Thanks. Arnold -- Posted via http://www.ruby-forum.com/.