similar to: how to read just a column

Displaying 20 results from an estimated 10000 matches similar to: "how to read just a column"

2006 Aug 31
1
alpha in Holt-Winters method
Hi, I'd like to know if the Holt-Winters function in R can modify the alpha paremeter in an "intelligent" way. I know it can vary from 0 to 1. Wich mathematical formula does it use to calculate the correct value of alpha? Thanks, bye. Carlo
2006 Jul 12
4
Is it possible to only read a subset by read.table ?
Hello, is it possible to do something like DATA <- read.table(file="blabla.dat",subset=(sex=="male")), i.e. make R read only a subset of a csv file ? I think it would be useful in case of very big datasets, but I can't find such a feature. Thanks for an answer, David Vonka
2006 Mar 07
7
reading in only one column from text file
How do I manipulate the read.table function to read in only the 2nd column??? [[alternative HTML version deleted]]
2011 Nov 08
3
Reading a specific column of a csv file in a loop
Dear all: I have two larges files with 2000 columns. For each file I am performing a loop to extract the "i"th element of each file and create a data frame with both "i"th elements in order to perform further analysis. I am not extracting all the "i"th elements but only certain which I am indicating on a vector called "d". See an example of my code below
2012 Jul 25
3
ff package: reading selected columns from csv
*Dear R users, Ive just started using the ff package. There is a csv file (~4Gb) with 7 columns and 6e+7 rows. I want to read only column from the file, skipping the first 100 rows. Below Ive provided different outcomes, which will clarify my problem * > sessionInfo() R version 2.14.2 (2012-02-29) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: ... attached base packages: [1] tools
2013 Nov 18
1
Reading in csv data with ff package
I've spent some time trying to wrap my head around reading in large csv files with the ff-package. I think I know how to do it, but am bumping into some problems. I've tried to recreate the issues as best as I can with a smaller example and maybe someone can help explain the problems. The following code just creates a csv file with an integer column, character column and logical column.
2006 Sep 26
2
colClasses: supressed 'NA'
Hi, The colClasses seem to be supressing 'NA' vlaues. How do I fix this? R script and first 5 lines of output is below. File "test2.dat" has blanks that are read as "NA" when I do not use 'colClasses', but as blanks when I use 'colClasses'. temp.df <- read.fwf("test2.dat", width=c(10,1,1,1,1,2,2,3,3,1),
2009 Dec 24
2
Column naming issues using read.table
Hi, this is my first post so please be gentle. I quite new to R and using it for my biology degree. My problem is. Im trying to import data from a .csv file using the read.table command. The .csv file header starts on row 2 but is contained in column 1, i have 600 data files and for future ease would rather not edit each file seperatly. The data starts on row three and I only need the first 381
2005 Feb 03
3
Reading Dates in a csv File
Hi all. I'm reading in a flat, comma-delimited flat file using read.csv. It works marvelously for the most part. I am using the colClasses argument to, basically, create numeric, factor and character classes for the columns I'm reading in. However, a couple of the fields in the file are date fields. I'm fully aware that POSIXct can be used as a class, however the field must obey,
2005 Apr 23
2
How to override coerion error in 'scan'
I am using 'read.csv' in V2.0.1 to read in a CSV file with the colClasses option and am getting an error from 'scan' when it encounters a non-numeric value for a 'numeric' column, i.e. > ds <- read.csv(in_file, nrows=irow, row.names=NULL, colClasses=zclass, comment.char="") Error in scan(file = file, what = what, sep = sep, quote =
2004 Dec 26
4
R's IO speed
R-devel now has some improved versions of read.table and write.table. For a million-row data frame containing one number, one factor with few levels and one logical column, a 56Mb object. generating it takes 4.5 secs. calling summary() on it takes 2.2 secs. writing it takes 8 secs and an additional 10Mb. saving it in .rda format takes 4 secs. reading it naively takes 28 secs and an
2012 Apr 23
1
Can I specify POSIX[cl]t column classes inside read.csv?
I'm loading a nicely formatted csv file. ? ? #!/usr/bin/env Rscript ? ? kpi <- read.csv( ? ? ? # This is a dump of the username, date_joined and last_login columns ? ? ? # from the auth_user Django table. ? ? ? 'data/2012-04-23.csv', ? ? ? colClasses = c('character') ? ? ) ? ? print(kpi[sample(nrow(kpi), 3),2:3]) Here's what the three rows I printed look like. ? ? ? ?
2007 Jan 17
3
Row limit for read.table
I have been trying to read in a large data set using read.table, but I've only been able to grab the first 50,871 rows of the total 122,269 rows. > f <- read.table("http://www.cs.odu.edu/~fmccown/R/Tchange_rates_crawled.dat", header=TRUE, nrows=123000, comment.char="", sep="\t") > length(f$change_rate) [1] 50871 From searching the email archives,
2013 Sep 30
4
read.table() with quoted integers
Hi! It seems that read.table() in R 3.0.1 (Linux 64-bit) does not consider quoted integers as an acceptable value for columns for which colClasses="integer". But when colClasses is omitted, these columns are read as integer anyway. For example, let's consider a file named file.dat, containing: "1" "2" > read.table("file.dat",
2010 Jul 02
2
unable to get bigglm working, ATTN: Thomas Lumley
I am using an example posted in this help forum to work with a file. the head of the file looks like: 988887 2007-03-05 2007-06-01 90 3 5.450 205500.00 999.00 999.000 0.000 0 0 988887 2007-03-06 2007-06-01 90 3 5.450 205500.00 999.00 999.000 0.000 1 0 988887 2007-03-07 2007-06-01 90 3 5.450 205500.00 999.00 999.000 -0.100 2 0 988887 2007-03-08 2007-06-01 90 3 5.450 205500.00 999.00 999.000 -0.100
2016 Sep 26
3
Concatenación de tablas
Buenas Tardes, Les escribo para solicitarles una ayuda dado que tengo 2 tablas, una con los campos: cedula | nombre | direccion y la otra con la tabla: cedula | barrio | municipio Lo que necesito es hacer una comparación del campo cedula de las dos tablas y si son iguales, agregarle los campos barrio y municipio de la segunda tabla a la fila correspondiente de esa cedula de la primera
2007 Jan 11
1
Treatment for Unequal Column Lengths?
Fellow R Users: I have a .csv dataset that I have brought into R via read.table (and also via read.csv). The dataset has columns that are not equal in length. Essentially, this data file has vectors/columns in which I plan to use different analyses on, hence they are unequal in length. Also, the columns are either numeric or calendar dates. Is there a way to prevent R from appending
2011 Jun 03
4
Problem using read.xls - Everything converted to factors
Hallo, I would like to use to read.xls function from the gdata package to read data from Microsoft Excel files but I experienced a problem: For example I used the following code: testfile<-read.xls("/home/.../wsjecon0603.xls", #file path header=F, dec=",", na.strings="n.a.", skip=5, sheet=2,
2011 Dec 08
2
read.table question
Hello All, This works, results <- read.table("plink.txt",T) while this doesn't. results <- read.table("plink.txt") Make sure your data frame contains columns CHR, BP, and P What does adding the "T" in read.table do? Which argument does this correspond to? I tried searching for it but didn't find the answer in: read.table(file, header = FALSE,
2010 Oct 13
1
RODBC: forcing a special column to be read in as character
Dear R-users, I am working with R version 2.10.1 and package RODBC Version: 1.3-2 under windows. Say I have a table "testtable" (in an Access data base), which has many different columns, among them a character column "X" with "integer-like" data as "0012345". Using sqlFetch, I'd like to assure that column X is read in as a character variable. So what