similar to: change all . to 0 in a data.frame

Displaying 20 results from an estimated 20000 matches similar to: "change all . to 0 in a data.frame"

2009 Mar 23
3
read in large data file (tsv) with inline filter?
I have a very large tab-delimited file, too big to store in memory via readLines() or read.delim(). Turns out I only need a few hundred of those lines to be read in. If it were not so large, I could read the entire file in and "grep" the lines I need. For such a large file; many calls to read.delim() with incrementing "skip" and "nrows" parameters, followed by grep()
2013 Feb 20
2
duplicate 'row.names' are not allowed
I am getting an error when trying to import tab delimited .txt file saved from Excel. I have read what is posted on the forums but still am confused. I saved my Excel file (DataTestforR.xlsx) as a tab delimited txt file (DataTestR.txt) on my Desktop. In the RGUI, I tried to import the txt file and got an error > myfile<-"C:\\Users\\jpapa\\Desktop\\DataTestR.txt" >
2009 Aug 19
4
Basic question: Reading in multiple choice question responses to a single column in data frame
I'm using read.delim to successfully read in tab delimited data, but some columns' values are comma seperated, reflecting the fact that user chose a few answers on a multi-select question. I understand that each answer is its own category and so could be represented as a seperate column in the data set, but I'd like the option of reading in the data column, and converting it to a
2006 Nov 13
2
Embedded carriage returns in text document
Colleagues, I am using R 2.4.0 on both a Mac (10.4.8) and Linux (RedHat 9). To read data from an Excel spreadsheet, I do "save as" in Excel, then select the "Text (tab-delimited)" format. The resulting file uses a tab separator and I can usually read the file using read.delim. Sometimes, the header row contains embedded carriage returns. When I view the file,
2003 Aug 28
4
R-help: beginner question
Hi, I am a beginner user of R. I have a trivial question ? I am almost ashamed I cannot figure it out does not matter how many times I am reading the help. I have a table in .txt format, tab delimited. I can read it with ?read.delim()? with no problems. Afterwards I would like to use boxplot function to see if there are any outliers in the column 5 of my data called TPAH16.ppm In the
2011 Apr 25
3
Question on Import
Hi! I have the data in a tab delimited text file titled "ken_data_try_anova." I tried to import it into R entering > read.delim(ken_data_try_anova) but received the error message Error in read.table(file = file, header = header, sep = sep, quote = quote, : object 'ken_data_try_anova' not found I have another file called 10423nad.txt. I tried
2006 Apr 05
3
data.frame to list
Hi, I'm new to R, and I'm not a statistician (stunned silence). I am trying to do the following: 1. read in a 2-column data file, e.g. status new db green title "Most Significant Excursions" 2. end up with an R list such that I can write e.g. lst$title and have R return "Most Significant Excursions". I know I could do this by coding lst = list(title="Most
2006 Oct 30
4
for importing "data"
*I am a very new user of R. I've spent several hours trying to import data, so I feel okay asking the list for help. * *I had an Excel file, then I turned it into a "tab-delimited" file, as instructed by directions My filename is "lahore.txt" I amusing the following commands for read.delim but i am getting following mesages. Sir i am sending you my excel data file i
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",
2011 Nov 07
1
DESeq
Hello, I have RNAseq data, which I am trying to analyze with DESeq. My file (tab delimited .txt) appears to be correct: >head(myfile) VZ_w13 VZ_w14a VZ_w14b VZ_w15a VZ_w15b VZ_w16a ENSG00000253101 0 0 0 0 0 0 ENSG00000223972 0 0 0 0 0 0... However, when I try to analyze the data with >cds <-
2005 Sep 08
1
Wishlist: write.delim()
Hi, It would be great if someone would add write.delim() as an adjunct to write.table(), just as with write.csv(). I store a lot of data in tab-delimited files and can read it in easily with: read.delim("text.txt", as.is=TRUE) and would love to be able to write it out as easily when I create these files. The obvious setting needed for write.delim() is sep = "\t", but in
2009 Sep 18
1
Reading clipboard with read.delim("clipboard") crash (PR#13957)
Full_Name: Liam Gretton Version: 2.9.2 OS: openSUSE 11.1 (x86_64) Submission from: (NULL) (143.210.13.77) Reading a large number of rows of delimited data via the clipboard results in a segfault or double free error. I've tested copying from various applications, but gedit will do. This problem exists in the openSUSE-supplied 2.8.1, I've just built 2.9.2 to see if it's still there,
2012 Nov 17
1
Strange problem with reading a pipe delimited file
I am trying to read in a pipe delimited file that has rows with varying number of columns, here is my sample data: A|B|C|D A|B|C|D|E|F A|B|C|D|E A|B|C|D|E|F|G|H|I A|B|C|D A|B|C|D|E|F|G|H|I|J You can see line 6 has 10 columns. Yet, I can't explain why R does like so: > test <- read.delim("mypaths4.txt", sep="|", quote=NULL, header=F,
2003 Nov 10
3
Reading an upper triangular matrix
Hola! I have data in the form of a symmetric distance matrix, in the file I have recorded only the upper triangular part, with diagonal. The matrix is 21x21, and the file have row and col names, and some other information. I am trying to read with the following code (I tried many variations on it, but all give the same error). The items in the data file is delimited by white space. (Part
2010 Oct 06
3
Help troubleshooting silent failure reading huge file with read.delim
I am trying to read a tab-delimited 1.25 GB file of 4,115,119 records each with 52 fields. I am using R 2.11.0 on a 64-bit Windows 7 machine with 8 GB memory. I have tried the two following statements with the same results: d <- read.delim(filename, as.is=TRUE) d <- read.delim(filename, as.is=TRUE, nrows=4200000) I have tried starting R with this parameter but that changed
2005 Oct 04
3
Problem reading in external data and assigning data.frames within R
Hey there, I apologize if this is an irritatingly simple question ... I'm a new user. I can't understand why R flips the sign of all data values when reading in external text files (tab delimited or csv) with the read.delim or read.csv functions. The signs of data values also seem to be flipped after assigning a new data.frame from within R (xnew <-- edit(data.frame()). What am
2004 Aug 09
5
How to import specific column(s) using "read.table"?
Dear R people, I have a very big tab-delim txt file with header and I only want to import several columns into R. I checked the options for "read.table" and only found "nrows" which lets you specify the maximum number of rows to read in. Although I can use some text editors (e.g., wordpad) to edit the txt file first before running R, I feel it?s not very convenient. The
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 Nov 08
2
Help Read File With Odd Characters
I have a large (105MB) data file, tab-delimited with a header. There are some odd characters at the beginning of the file that are preventing it from being read by R. > dfTemp = read.delim(filename) Error in make.names(col.names, unique = TRUE) : invalid multibyte string at '<ff><fe>m' When I view the file with head, I see: ??muni_code parcel_id? The file is too large
2004 May 28
3
Converting data frame to array?
Dear List, Please bear with a poor newbee, who might be doing everything backwards (I was brought up in pure math). I want to make a simple multi-linear regression on a set of data. I did some expreiments, and if X is a 4 by 2 array and Y is a 4 by 1 array, I can do a linear regression by lm(y~x). Now I have a tab-delimited text file with 10 rows of 300 measurements and an other file with