similar to: Strange problem with reading a pipe delimited file

Displaying 20 results from an estimated 5000 matches similar to: "Strange problem with reading a pipe delimited file"

2011 Mar 23
4
Modifying a particular column in a tab-delimited file
Hello R users, Good day!! I was wondering if there is a way in R to read in a particular column from a tab-delimited file, edit it and write it back into the file with all other columns intact. When I say edit I mean just replacing all the values in that column. I know to read a particular column from a file using colClasses option in read.delim() function. Is there any such option to write out
2012 Nov 21
6
Scaling values 0-255 -> -1 , 1 - how can this be done?
I have a dataframe in which I have values 0-255, I wish to transpose them such that: if value > 127.5 value = 1 if value < 127.5 value = -1 I did something similar using the "binarize" function of the biclust package, this transforms my dataframe to 0 and 1 values, but I wish to use -1 and 1 and looking for a way in R to do this. Brian
2014 Jul 01
1
combining data from multiple read.delim() invocations.
Is there a better way to do the following? I have data in a number of tab delimited files. I am using read.delim() to read them, in a loop. I am invoking my code on Linux Fedora 20, from the BASH command line, using Rscript. The code I'm using looks like: arguments <- commandArgs(trailingOnly=TRUE); # initialize the capped_data data.frame capped_data <- data.frame(lpar="NULL",
2005 Apr 18
2
colClasses = "Date" in read.delim, how to pass date-format?
Hi I have a huge data-set with one column being of type date. Of course I can import the data using this column as "factor" and then convert it later to dates, using: sws.bezuege$FaktDat <- dates(as.character(sws.bezuege$FaktDat), format = c(dates = "d.m.y")) But the conversion requires a huge amount of memory (and time), therefore I would
2012 Sep 26
3
Reading multiple files
Hi, I have 35 data files for reading. I would like get a program for performing reading of 35 files at once. All are of the type: Dados1.raw, Dados2.raw and so on. If the files have the same number of columns, I can read with the following commands: rm(list=ls()) filenames = list.files(path="~/Silvano/Arq", pattern="Dados+.*raw") names = substr(filenames, 1, 7) for(i in
2005 Apr 24
1
large dataset import, aggregation and reshape
Dear useRs We have a data-set (comma delimited) with 12Millions of rows, and 5 columns (in fact many more, but we need only 4 of them): id, factor 'a' (5 levels), factor 'b' (15 levels), date-stamp, numeric measurement. We run R on suse-linux 9.1 with 2GB RAM, (and a 3.5GB swap file). on average we have 30 obs. per id. We want to aggregate (eg. sum of the measuresments under
2006 Apr 12
1
Pipe delimiter ( | ) in "read.delim"
Hi R folks, Can anyone tell me how to read in a pipe ("|") delimited text file? I've tried the following: read.delim("c:/junk/junk.txt",sep="|", skip=7, check.names=FALSE,quote = "", header=F) The file looks something like the following: RD|I|04|013|9997|68103|5|7|017|830|20000221|00:00|12.6||6|||||||||||||
2008 May 30
1
Skipping columns to save memory
I have a very large tab delimited file (~ 1.97 GB) that I need to read in to R. The data contain 10 columns and there are millions of rows. I need all rows of the data, but I only need the first column in the data. I was looking at the ?read.delim and am trying to see if it is possible to tell this function only to read in the first column and skip the others. The help file says the number of
2012 Dec 06
4
Assignment of values with different indexes
I would like to take the values of observations and map them to a new index. I am not sure how to accomplish this. The result would look like so: x[1,2,3,4,5,6,7,8,9,10] becomes y[2,4,6,8,10,12,14,16,18,20] The "newindex" would not necessarily be this sequence, but a sequence I have stored in a vector, so it could be all kinds of values. here is what happens: > x <- rnorm(10)
2009 Sep 23
1
read.delim very slow in reading files with lots of columns
Hi, I am trying to read a tab-delimited file into R (Ver. 2.8). The machine I am using is 64bit Linux with 16 GB. The file is basically a matrix(~600x700000) and as large as 3GB. The read.delim() ran extremely slow (hours) even with a subset of the file (31 MB with 6x700000) I monitored the memory usage, and found it constantly only took less than 1% of 16GB memory. Does read.delim()
2010 Jul 18
2
Import of specific column of many space-delimited text files
Hi, I have about 300 space-delimited text files and from each file I want to import one specific column into R to create a data frame where all imported columns are included. Is there a smart way to do so? Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Import-of-specific-column-of-many-space-delimited-text-files-tp2293273p2293273.html Sent from the R help mailing list
2011 Jan 14
2
read in data, maintain decimal places
Good day, All, Is there any way to maintain the number of decimal places in the type of situation below? I would like to maintain the number of decimal places in 0.667, despite the fact that its column-mates have a fourth decimal place. Thank you for your time. Jim dat.txt contents: MARKER ALLELES FREQ1 RSQR EFFECT2 STDERR CHISQ PVALUE rs6599753 C,T
2012 Feb 08
2
Problems reading tab-delim files using read.table and read.delim
Hello, I used read.xlsx to read in Excel files but for large files it turned out to be not very efficient. For that reason I use a programme which writes each sheet in an Excel file into tab-delim txt files. After that I tried using read.table and read.delim to read in those txt files. Unfortunately, the results are not as expected. To show you what I mean I created a tiny Excel sheet with some
2012 Dec 02
2
How to re-combine values based on an index?
I am able to split my df into two like so: dataset <- trainset index <- 1:nrow(dataset) testindex <- sample(index, trunc(length(index)*30/100)) trainset <- dataset[-testindex,] testset <- dataset[testindex,-1] So I have the index information, how could I re-combine the data using that back into a single df? I tried what I thought might work, but failed with:
2010 Oct 26
3
Reading in a tab delimitated file
Hi all, I have a total newbie question, but I could really use some help. I need to read in this file: SampleID Disease E-CBIL-28-raw-cel-1435145228.cel 1 E-CBIL-28-raw-cel-1435145451.cel 2 E-CBIL-28-raw-cel-1435145479.cel 2 E-CBIL-28-raw-cel-1435145132.cel 3 E-CBIL-28-raw-cel-1435145417.cel 3 E-CBIL-28-raw-cel-1435145301.cel 2 E-CBIL-28-raw-cel-1435145558.cel 1
2012 Nov 24
2
Building factors across two columns, is this possible?
I am trying to make it so two columns with similar data use the same internal numbers for same factors, here is the example: > read.csv("test.csv",header =FALSE,sep=",") V1 V2 V3 1 sun moon stars 2 stars moon sun 3 cat dog catdog 4 dog moon sun 5 bird plane superman 6 1000 dog 2000 > data <-
2012 Dec 19
2
Copy data from Excel
Hello again, I my day to day calculation, I need to take lot of data from Excel and forth and generally I use 'clipboard' option with read.delim() function. However many time, the data in Excel are like '(111,000)' instead of '-111000'. Generally I convert data in the 2nd form in Excel itself and then copy to clipboard. Is there any option in R, so that I can
2010 Jun 18
5
extract date time from a text file
I a have a text file where every line is like that: "2007-12-03 13:50:17 Juan Perez" ("yy-mm-dd hh:mm:ss First Name Second Name") I would like to make a data frame with two column one for date and the other one for name. When I use read.delim it was transformed in a data frame with 4 colums. Bye, Sebasti?n.
2007 Apr 18
10
importing excel-file
Dear R-experts, It is a quite stupid question but please help me. I am very confuced. I am able to import normal txt ant mat-files to R but unable to import .xls-file I do not understand the online help. Can please anyone send me the corresponding command lines? The .xls-file is attached. In my file we use commas for the decimal format (example: 0,712), changes might be needed. Thanks, Corinna
2010 May 04
2
read.table: skipping trailing delimiters
Hi, I am trying to read a tab-delimited file that has trailing tab delimiters. It's a simple file with two legitimate fields. I'm using the first as row.names, and the second should be the only column in the resulting data frame. Initially, R was filling the last column with NA's, but I was able to stop that by setting