search for: allowescapes

Displaying 20 results from an estimated 33 matches for "allowescapes".

2005 Jul 27
2
R 2.1.1: read.table processes C-style escapes (PR#8037)
In R 2.1.1, the default behaviour of scan() was changed to process all C-style escapes, even when a delimiter was specified using the 'sep' argument. A new argument 'allowEscapes' was introduced to turn this processing off. Because read.table() calls scan(), read.table() inherits the new default behaviour of scan() but without a way to turn it off. For example, reading a file testdata.txt' containing X A \0 C produces > read.delim("testdata.txt"...
2010 Apr 08
1
Using read.table to read file created with read.table and qmethod = "escape"
...able("test.csv", sep = ",") [1] V1 <0 rows> (or 0-length row.names) Warning message: In read.table("test.csv", sep = ",") : incomplete final line found by readTableHeader on 'test.csv' > read.table("test.csv", sep = ",", allowEscapes = T) [1] V1 <0 rows> (or 0-length row.names) Warning message: In read.table("test.csv", sep = ",", allowEscapes = T) : incomplete final line found by readTableHeader on 'test.csv' And I can't see any other options in read.table that would apply. Regards, H...
2009 Jun 17
1
problem with scan recognizing newline '\n'
...ng '\n' as newline. At least that's what I assume the problem is, but I can't identify which those might be or how to correct the problem. Below is my code and the problem output followed by sessionInfo(). This is executed in a loop, with i starting from zero. I also tried with 'allowEscapes = TRUE', but that made no difference. As you can see, the first FLAC file is followed by a '\n', which is ignored. This seems to happen about once in every 20 file names, so it does work properly most of the time. Also, when the file is opened in emacs, the newlines are recognized. cur...
2006 Aug 16
6
read.csv issue
I'm trying to read in some data from a .csv format and have come across the following issue. Here is a simple example for replication # A sample .csv format schid,sch_name 331-802-7081,School One 464-551-7357,School Two 388-517-7627,School Three \& Four 388-517-4394,School Five Note the third line includes the \ character. However, when I read the data in I get >
2011 Dec 08
2
read.table question
...as.is = !stringsAsFactors, na.strings = "NA", colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = "#", allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors(), fileEncoding = "", encoding = "unknown") Could someone please explain? Thanks P [[alternative HTML version deleted]]
2012 Jun 28
1
how to skip from some null file and go on reading?
hi , I am reading a series of files by the command shown as below. cop_x_data<-read.table(flnm(i) ,skip=2,allowEscapes=TRUE,blank.lines.skip=TRUE) the first two line of the files are headfile and I skip them by skip=2. and sometimes the data file is null and there is no any data in the file except for the head information. At this situation,my command would be in the error and tell me that there is not data in the...
2010 Jan 11
2
Documentation: format of read.table help text (PR#14180)
...ts comes in seven different formats, more or less explicit about the consequences of a TRUE (or FALSE): 1. check.names logical. If TRUE then the names... 2. blank.lines.skip logical: if TRUE blank lines... 3. flush logical: if TRUE, scan... 4. header a logical value indicating whether... 5. allowEscapes logical. Should C-style [...] ? 6. stringsAsFactors logical: should character [...] ? 7. strip.white logical. Used only when... First, I believe that a consistent style would make the help text easier to follow. Second, I believe that an explicit style (sth like: "logical. If TRUE/FALSE...
2009 Mar 02
2
R-code help for filtering with for loop
...64. For this purpose I use the following R code; --------------- datax<-read.table("filter_test.txt",row.names=1,sep="\t",header=TRUE,dec = ".",as.is =TRUE,na.strings = "NA", colClasses = NA,check.names = FALSE,strip.white = FALSE, blank.lines.skip = TRUE, allowEscapes = FALSE, flush = FALSE,encoding = "unknown") filter<-datax[,1:6] filtered<-vector() for(i in 1:(dim(filter)[1])) { for(j in 1:(dim(filter)[2])) { x=(filter[i,j])>=64 filtered[i]<-x } } # summing the result of the above sum(filtered) which(filtered) z<-which(filtered)...
2010 May 19
1
apparent problems with the textConnection command
...r, in my example, initial testing with this command fails while the longer step of reading from a text file succeeds. Is there any reason for this? Is there any workaround for the problem with the textConnection command ? 2. There appear to be similiar problem with the read.table command. Using the allowEscapes =TRUE did not seem to help. Is there some other option here? Like, for example, temporarily setting another character like "<" as the escape character?? I would like to explain here that these questions are not directly related to any real world problem solving. They are just my attem...
2010 Mar 12
7
sqldf not joining all the fields
..."\"'", dec = ".",as.is = TRUE,na.strings = "NA",colClasses = NA, nrows = 3864284, skip = 0, check.names = TRUE,fill=TRUE, strip.white = TRUE, blank.lines.skip = TRUE, comment.char = "#", allowEscapes = FALSE, flush = FALSE, fileEncoding = "", encoding = "unknown") x_data prochi prescribed_date dataMonth item_code res_seqno quantity directions CAO0000713 22/06/2001 NULL 842752 NULL 60 1/D CAO0000713 28/04/2000 NULL...
2009 Nov 24
1
Encoding problems.
...dec = ",", # row.names, col.names, + na.strings = "", colClasses = NA, nrows = -1, + skip = 0, check.names = TRUE, + strip.white = FALSE, blank.lines.skip = TRUE, + comment.char = "#", + allowEscapes = FALSE, flush = FALSE, + stringsAsFactors = FALSE) > close(con) It seems that R does recognize the locales since it tries to report errors in French here is a simple example: > ttt.g <- "g?rald" Erreur : caract??res multioctets incorrects dans l'analyse de...
2015 Sep 29
5
sobre fread {data.table}
...row.names, col.names, as.is = !stringsAsFactors, na.strings = "NA", colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = "#", allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors(), fileEncoding = "", encoding = "unknown", text, skipNul = FALSE) Saludos, Pedro ============= En respuesta a: ------------------------------ Message: 2 Date: Tue, 29 Sep 2015 16:55:0...
2015 Sep 29
2
sobre fread {data.table}
...ors, > > na.strings = "NA", colClasses = NA, nrows = -1, > > skip = 0, check.names = TRUE, fill = !blank.lines.skip, > > strip.white = FALSE, blank.lines.skip = TRUE, > > comment.char = "#", > > allowEscapes = FALSE, flush = FALSE, > > stringsAsFactors = default.stringsAsFactors(), > > fileEncoding = "", encoding = "unknown", text, skipNul = > FALSE) > > > > > > Saludos, > > Pedro > > > > ============= > &gt...
2007 Jun 05
1
Inverse of encodeString
What is the inverse of encodeString? For example, \u1 is some Unicode symbol. If I do s <- encodeString("\u1") then s will be the string "\001". But anything I do with s, will not return the Unicode that corresponds to \u1: cat(s, "\n") # prints \001 cat("\u1", "\n") # prints y with umlaut Alberto Monteiro
2015 Sep 29
2
sobre fread {data.table}
...s, as.is = !stringsAsFactors, > na.strings = "NA", colClasses = NA, nrows = -1, > skip = 0, check.names = TRUE, fill = !blank.lines.skip, > strip.white = FALSE, blank.lines.skip = TRUE, > comment.char = "#", > allowEscapes = FALSE, flush = FALSE, > stringsAsFactors = default.stringsAsFactors(), > fileEncoding = "", encoding = "unknown", text, skipNul = FALSE) > > > Saludos, > Pedro > > ============= > En respuesta a: > > ----------------------...
2006 Nov 07
2
R help
*I am a very new user of R. I've spent several hours trying to import data, I am successful in importing data from Excel. After having the data on R console, I am not understanding how to make a file for imported data,so I feel okay asking the list for help. * *I have used save workspace option from file menu. but when i have to use that saved workspace in extReme toolkit using read data
2006 Apr 17
7
help
Hi, I am trying to runn a age-period-cohort model, but here is what I am having problem with, hope you can help me! This is what I am trying to do: sumzero_a<-((A-min(A))/5+1) - mean((A-min(A))/5+1) where A is my age variable (numeric, the mid-point of a five-year age group), but I got the following error: Error in min(..., na.rm = na.rm) : invalid 'mode' of argument I am pretty
2010 Aug 09
0
Fwd: RE: pvclust function
...\"'", dec = ".", row.names, col.names, as.is = !stringsAsFactors, na.strings = "NA", colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = "#", allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors(), fileEncoding = "", encoding = "unknown") I am not sure how to interpret this! Kind Regards, Hannah -----Original Message----- From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project....
2015 Sep 30
2
sobre fread {data.table}
...t; na.strings = "NA", colClasses = NA, nrows = -1, >>> skip = 0, check.names = TRUE, fill = !blank.lines.skip, >>> strip.white = FALSE, blank.lines.skip = TRUE, >>> comment.char = "#", >>> allowEscapes = FALSE, flush = FALSE, >>> stringsAsFactors = default.stringsAsFactors(), >>> fileEncoding = "", encoding = "unknown", text, skipNul = >>> FALSE) >>> >>> >>> Saludos, >>> Pedro >>> &gt...
2005 Jun 29
2
How to convert "c:\a\b" to "c:/a/b"
I couldn't resist adding a more literal answer unback <- function(x) { chars <- unlist(strsplit(deparse(x),"")) chars <- chars[-c(1,length(chars))] paste(gsub("\\\\","/",chars),collapse="") } unback("\n") | David Duffy (MBBS PhD) ,-_|\ | email: davidD at qimr.edu.au ph: