similar to: How to transfer a list of space delimited character elements into a char vector?

Displaying 20 results from an estimated 4000 matches similar to: "How to transfer a list of space delimited character elements into a char vector?"

2008 Aug 05
1
About Creating a List by Parsing Text
Hi all, I have the following data in which I want to parse and store them in a list __DATA__ > print(comp.ll) [1] "\tGene 11340 211952_at RANBP5 k= 1 LL= -970.692 " [2] "\tGene 11340 211952_at RANBP5 k= 2 LL= -965.35 " [3] "\tGene 11340 211952_at RANBP5 k= 3 LL= -963.669 " [4] "\tGene 12682 213301_x_at TRIM24 k= 1 LL= -948.527 "
2009 Mar 09
3
How to write a function that accepts unlimited number of input arguments?
Dear R-helpers: I am an R newbie and have a question related to writing functions that accept unlimited number of input arguments. (I tried to peek into functions such as paste and cbind, but failed, I cannot see their codes..) Can someone kindly show me through a summation example? Say, we have input scalar, 1 2 3 4 5 then the ideal function, say sum.test, can do
2009 Nov 21
1
R strings, null-terminated or size delimited?
Hello. I've been looking at vecsexps for my binding. Concerning strings, I'm wondering: are they supposed to be null-delimited? Are they delimited by the info in the SEXPHEADER macro in Rinternals.h? Basically, what are the macros or functions to access the values of the vecsexps? I'm thinking of CHARSXPs and INTSXPs for the moment... All the best, -- Guillaume Yziquel
2008 May 25
2
How to create tab-delimited text files
Hello Friends I want to generate tab-delimited text file of my every users information in once. i have a button called EXPORT on my page when i clicked on this button than i want to generate tab-delimited text file for every users information. can anybody give any snippet of code or any idea for this Thanks -- Posted via http://www.ruby-forum.com/.
2010 Jun 15
2
Fastest way to merge matrix columns into a comma delimited string?
Folks: Say I have a matrix: test=matrix(c(1,2,3),nrow=10,ncol=3) I would like to have an output character vector where each line is row's values delimited by commas, e.g.: "1,2,3" "2,3,1" "3,1,2" ... "1,2,3" What is the fastest way of doing this? I can paste() row-by-row but this seems an inefficient approach to doing this. Thanks! I'm not
2010 Oct 20
2
preferred x-delimited data format for R?
Dear all What is the preferred spreadsheet-like x-delimited data format for use with R? Should I prefer tab-, comma-, space- or some_other_delimitor-seprated data? I'm asking this because I've been once bitten by CSV data containing ` ' ' (apostrophe) symbols that R couldn't easily digest. Probably no the best approach, I've eventually inspected the document and removed
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
2007 Feb 26
1
Chi Square with two tab-delimited text files
Hi, I want to do a chi square test and I have two tab delimited text files with Expected and Observed values to compare. Each file contains only the values and are 48 rows by 116 columns. I have managed to do something with them, but I don't think it is right as I got a p value of 1. In this case I used the read.table() function to read the values from the files. But I don't know if
2008 Apr 30
1
Tab-delimited AOV summaries
Hello, I am trying to print out ANOVA summaries --- as returned by summary (aov(...))--- in tab-delimited format, either to a file or to the console, but so far I haven't been able to figure out a solution. My particular ANOVA has repeated measures, so it is an instance of class aovlist. Can anyone offer any suggestions? I am relatively new to R, so please forgive me if I am missing
2009 Nov 26
1
analyse tab delimited textfile microarray data(help)
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091126/6366832d/attachment-0001.pl>
2012 Apr 04
3
Remove carriage return in writing tab-delimited file.
Having problems with the write.table function. I can write a tab delimited file just fine, but for each line in my matrix its inputs a carriage return when i dont want it to. For example my matrix might be: ID V1 V2 V3 FARY1004 1 2 3 FARY2067 2 3 1 FARY4587 2 2 2 And I want the written File to be: FARY1004 1 2 3FARY2067 2 3 1FARY4587 2 2 2 TIA -- View this
2010 Mar 23
2
Saving tab/csv delimited data with NaN's
Hello, I am working multiple simulated data sets with missing values, I would like to store these data sets in either tab delimited format for .csv format with missing values marked as NaN's instead of NA's. I read the import/export document which mentions that write.table command converts NaN's to NA. Is there any other way I can store the NaN's. I tried the write syntax
2002 Nov 06
1
What else do tab-delimited and csv do differently?
Until recently, I naively believed that a csv was the same as a tab-delimited file except commas replaced tab characters (provided of course, the characters being separated weren't either). Evidently, that is not the case. I tried reading a tab-delimited file (created in Excel [2000, W2K] and ftp'd as ASCII to linux) into R platform i686-pc-linux-gnu arch i686 os
2007 May 20
3
Why a multi column, tab delimited file has only one column after reading in with read.table specification sep="\t"
Dear all: I have a tab delimited file as following AGE WEIGHT PROTEIN ........ 6 20 3 ........ 8 39 4 ........ I tried to read it as following: data <- read.table(file,sep="\t",header=T); but there is only column for the data after reading in,: dim(data); [1] 200 1 the column name is "AGE...WEIGHT...........PROTEIN...." Any quick suggestion will be appreciated.
2013 Jul 10
2
Replacing part of delimited string with R's regex
I have the following list of strings: name <- c("hsa-miR-555p","hsa-miR-519b-3p","hsa-let-7a") What I want to do is for each of the above strings replace the text after second delimiter with "zzz". Yielding: hsa-miR-zzz hsa-miR-zzz hsa-let-zzz What's the way to do it? [[alternative HTML version deleted]]
2003 Mar 05
3
reading in tab delimited data in a loop
Dear all, I need to read in 4 sets of tab delimited data in a loop. The 4 data sets are called "simu1.dat", "simu2.dat" and so on. I know what I need on the righthand side of the read.table expression but I can't the left hand side of it to work (see the line in bold below). Can you kindly help? Many thanks. simu1 <- matrix(0,30,3) simu2 <- matrix(0,30,3) simu3
2010 Nov 22
3
"unexpected numeric constant" while reading tab delimited csv file
my csv file is very simple - just one line for purpose of this test: 0{TAB}0 and read function is this: csvdata = read.csv(file="d:/s/test.csv",head=FALSE,sep="\t") then error comes: Error in source("d:/test.csv") : d:/test.csv:1:9: unexpected numeric constant 1: 0 0 but when I change delimiter to ; (colon) then error not shows up anymore -- View this
2012 Jan 19
2
Reading in tab (and space) delimited data within a script XXXX
Hello everyone, I use Bob Muenchen's approach for reading in "in-stream" (to use SAS parlance) delimited data within a script. This works great: mystring <- "id,workshop,gender,q1,q2,q3,q4 1,1,f,1,1,5,1 2,2,f,2,1,4,1 3,1,f,2,2,4,3 4,2, ,3,1, ,3 5,1,m,4,5,2,4 6,2,m,5,4,5,5 7,1,m,5,3,4,4 8,2,m,4,5,5,5" mydata <- read.table( textConnection(mystring),
2008 Mar 31
2
convert delimited string to vector
Hi R Users, Simple question: How might I convert the text "a, b, c" (or for that matter "a b c" with any delimiter - space, comma, etc.) into a 3-element character vector? [1] a b c Thanks, Brad
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,