similar to: write.csv / string extraction and field limits

Displaying 20 results from an estimated 3000 matches similar to: "write.csv / string extraction and field limits"

2007 Sep 14
1
Copying row names
I have been trying to copy the row names of one matrix to another matrix but having difficulty. The original matrix contains a row name which I would like to replicate in the new matrix. I use the following approach? The two matrices have identical dimensions. rN <- row.names(origMatrix) row.names(newMatrix) <- rN However the new matrix does not take on the labels. I have also tried,
2007 Nov 08
2
Col.names parameter in write.csv (PR#10411)
Full_Name: Kingsley Oteng-Amoako Version: 2.5.1 OS: Windows 5.1.2600 (Windows XP) Submission from: (NULL) (203.185.215.144) The col.names=false in the write.csv command does not work as documented. Attempting to write a vector to a csv file without column headers does not work as documented. The col.names=false feature on the write.table command does however work and it can thus be coerced
2011 Aug 10
1
column names issue with read.csv
Dear List, I wonder why when using read.csv(), if the column name contains a numeric i.e. a stock symbols-"0001.HK", it will automatically insert an "X" character to the column names - "X0001.HK". Now I have to manually do a loop and use substring() to remove the "X" character. Any advice? Thanks Anthony
2010 Oct 29
1
Updating asteriskcdrdb with uniqueid field from Master.csv, Master.csv.1....Master.csv.5 - Must I bring all files together first?
Hi Everyone, Just noted that PBXinaFLASH failed me again on yet something else. The uniqueid field didn't update on the asteriskcdrdb in the past few months but it is available in the .csv files in /var/log/asterisk/cdr-csv/*.csv I have already re-did the asterisk-addons install with correct parameters to include future calls "uniqueid" in the table (I have no clue why these
2007 Feb 27
1
read.csv size limits
I have been using the read.csv function for a while now without any problems. My files are usually 20-50 MBs and they take up to a minute to import. They have all been under 50,000 rows and under 100 columns. Recently, I tried importing a file of a similar size (which means about the same amount of data), but with ~500,000 columns and ~20 rows. The process is taking forever (~1 hour so far). In
2014 Oct 13
0
[PATCH] ls: in CSV mode, always have a checksum field (RHBZ#1151900).
Make sure to output the field for checksum even for non-regular files, as empty, in CSV output mode. This ensures each line has the same number of fields, regardless of the file type. --- cat/ls.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cat/ls.c b/cat/ls.c index de8248e..2cb4e74 100644 --- a/cat/ls.c +++ b/cat/ls.c @@ -524,12 +524,15 @@ show_file (const
2012 Mar 26
2
read.csv and field containing single quotes
I need to read in csv files, created by 3rd party, with fields containing single quotes (as shown below). "header1","header2","header3","header4" "field1r1","field2r1","field3r1","field4r1" "field1r2","field2r2","field3r2PartA), field3r2PartB Very" Long","field4r2"
2010 Aug 22
4
how to implement string pattern extraction in R
Hi, In perl, to get a substring matching a particular pattern can be implemented like the following example: $x = "AAAA.txt"; if ($x=~ /(.*?)\.txt/){ $prefix = $1; } So how to do the same thing in R? Can someone provide me the code sample? Thanks much in advance. -- Waverley @ Palo Alto
2005 Oct 28
3
splitting a character field in R
Dear R users, I have a dataframe with one character field, and I would like to create two new fields (columns) in my dataset, by spliting the existing character field into two using an existing substring. ... something that in SAS I could solve e.g. combining substr(which I am aware exist in R) and "index" for determining the position of the pattern within the string. e.g. if my
2008 Oct 09
1
question of R to do perl matching and matched string extraction
Hi, I want to extract some of the substring via pattern recognition. But I don't know how to do it in R. In perl: my $url = "/pages-cell.net/deepan/sony/"; if($url =~ m/\/(.*)\//g) { my @result = $1; return @result; } How does the same work in R? Thanks much in advance -- Waverley @ Palo Alto
2012 Feb 17
6
convert zoo object to "standard" R object so I can plot and output to csv file
Another newbie question I got the 1 minute spine interpolation and 15 mean aggregation working with many thanks to Gabor Grothendieck using Zoo functions. I got a tip from Hasan Diwan to look at xts but it seemed I would make better progress using code from Gabor. Now I'm having trouble plotting this zoo object. I'm thinking I want a function to "split" the zoo object back to
2013 Apr 26
2
Splitting data.frame and saving to csv files
Dear R Forum, I have a data.frame as df = data.frame(date = c("2013-04-15", "2013-04-14", "2013-04-13", "2013-04-12", "2013-04-11"), ABC_f = c(62.80739769,81.04525895,84.65712455,12.78237251,57.61345256), LMN_d = c(21.16794336,54.6580401,63.8923307,87.59880367,87.07693716), XYZ_p = c(55.8885464,94.1358684,84.0089114,98.99746696,64.71083712),
2019 Feb 20
0
Bug: time complexity of substring is quadratic as string size and number of substrings increases
Update: I have observed that stringi::stri_sub is linear time complexity, and it computes the same thing as base::substring. figure https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png source: https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.R To me this is a clear indication of a bug in substring, but again it would be nice to have
2020 Oct 05
2
isc-dhcp dynamic update problem
Hi, I have a buster system configured as a DC running 4.11.13 from Louis's repo. I am trying to get https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9 working. Mostly it seems to work but there seems to be a problem with what dhcpd writes into the leases file in the "on release" stanza. When dhcpd writes the On Release stanza I get something like the
2010 Dec 20
1
Writing to a CSV with Faster::CSV
Is there a way to write a csv file using a hash instead of an array? Something like this: header_keys = :first_name, :last_name, :email FasterCSV.open("path/to/file.csv", "w") do |csv| User.all.do |user| csv << user end end Thanks... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2003 Jul 24
0
unz( "x.zip", "y.csv" ) != pipe( "unzip -p x.zip y.csv" )
Not sure this is a bug in R. Maybe its a bug in my understanding of unz(). The character 'b2' (hexadecimal) is in position 535 of line 1 of 'naughty.csv'. This character appears as superscript '2' and came to me in an EXCEL file that I converted to text in a comma separated ( *.csv ) format. The first line gets truncated by readLines after 534 characters using unz():
2008 Oct 09
1
Write multiple objects / data frames into a single .csv -- write.csv
Hello, Is there a way to put multiple data.frames or objects into a single .csv ? I know I can use sink() to do this for a text file. Is there way to do it for a .csv? e.g. for sink() sink("c5.k.s.p.92.LN.sl.vs.mean.txt") symnum(c5.k.92.LN.sl.vs.mean) symnum(c5.s.92.LN.sl.vs.mean) symnum(c5.p.92.LN.sl.vs.mean) sink() Could I put these all into a single .csv, in a similar format to
2010 Jan 21
1
How to write '"' to a csv with the default setting of write.csv?
Please see the following example. I can not write '"' to a csv file successfully. Could somebody let me if it is possible to write '"' to a csv file with the default setting of write.csv? my_home$ Rscript main_quote.R > x=rbind( + "\"A\"" + , "\"B\"" + ) > x [,1] [1,] "\"A\"" [2,]
2011 Nov 11
1
Have write.csv write csv without observation number
Hello all, Have a little annoying issue with wreite.csv. It always writes out observation number. Is there a way to avoid this. Thanks, DL -- View this message in context: http://r.789695.n4.nabble.com/Have-write-csv-write-csv-without-observation-number-tp4030672p4030672.html Sent from the R help mailing list archive at Nabble.com.
2019 Feb 22
1
Bug: time complexity of substring is quadratic as string size and number of substrings increases
On 2/20/19 7:55 PM, Toby Hocking wrote: > Update: I have observed that stringi::stri_sub is linear time complexity, > and it computes the same thing as base::substring. figure > https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png > source: > https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.R > > To me this is a