Displaying 20 results from an estimated 20000 matches similar to: "Re-assigning variables stored as character strings in another variable"
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
I see the problem on Windows 10, R-3.4.0, R.exe. It is not compiled for
debugging but gdb gives some information when I attach the debugger after
the 'R..has stopped working' popup appears. I don't know how reliable it
is:
(gdb) info threads
Id Target Id Frame
* 4 Thread 11848.0x1500 0x00007ffe38dc8861 in ntdll!DbgBreakPoint ()
from
2017 Jul 15
3
readLines without skipNul=TRUE causes crash
I am not able to reproduce this on a Linux platform:
#######################3
fn1 <- "/home/jdnewmil/Downloads/Microdados ENEM 2009/Dados Enem 2009/DADOS_ENEM_2009.txt"
sessionInfo()
## R version 3.4.1 (2017-06-30)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 14.04.5 LTS
##
## Matrix products: default
## BLAS: /usr/lib/libblas/libblas.so.3.0
## LAPACK:
2017 Jul 17
0
readLines without skipNul=TRUE causes crash
The original file had a lot of trailing null bytes so I tried making a
similar file with:
tf <- tempfile(); file <- file(tf, "wb")
for(i in 1:(2^15-1))writeBin(rep(as.raw(32:127), len=2^16), file)
for(i in 1:(2^15-1))writeBin(rep(as.raw(0L), len=2^16), file)
close(file)
log2(file.size(tf))
#[1] 31.99996
Reading this with readLines() caused R-3.4.0 to segfault in Rf_con_pushback
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
I am not able to reproduce your segfault on a Windows 7 platform either:
##########################
fn1 <- "d:/DADOS_ENEM_2009.txt"
sessionInfo()
## R version 3.4.1 (2017-06-30)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 7 x64 (build 7601) Service Pack 1
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=English_United States.1252
## [2]
2017 Jul 15
4
readLines without skipNul=TRUE causes crash
hi, thanks Dr. Murdoch
i'd appreciate if anyone on r-help could help me narrow this down? i
believe the segfault occurs because there's a single line with 4GB and also
embedded nuls, but i am not sure how to artificially construct that?
the lodown package can be removed from my example.. it is just for file
download cacheing, so `lodown::cachaca` can be replaced with
`download.file`
2017 Jul 16
3
readLines without skipNul=TRUE causes crash
hi, thank you for attempting this. it looks like your unix machine unzipped
the txt file without corruption -- if you copied over the same txt file to
windows 7, i don't think that would reproduce the problem? i think it
needs to be the corrupted text file where R.utils::countLines( txtfile
) gives 809367. i am able to reproduce on two distinct windows machines
but no guarantee i'm
2017 Jul 16
2
readLines without skipNul=TRUE causes crash
hi, yep, there are two problems -- but i think only the segfault is within
the scope of a base R issue? i need to look closer at the corrupted
decompression and figure out whether i should talk to the brazilian
government agency that creates that .rar file or open an issue with the
archive package maintainer. my goal in this thread is only to figure out
how to replicate the goofy text file so
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
hi, i realized that the segfault happens on the text file in a new R
session. so, creating the segfault-generating text file requires a
contributed package, but prompting the actual segfault does not -- pretty
sure that means this is a base R bug? submitted here:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17311 hopefully i am
not doing something remarkably stupid. the text file
2004 Jul 08
3
How to pass strings to functions? [once once more, now With content I hope...]
Dear expeRts,
I fail to succesfully pass strings to functions. It comes down to the
observation that
> plot(someVariable,anotherVariable)
works fine, but
> x <- "someVariable"
> y <- "anotherVariable"
> plot(x,y)
does not.
Does this have something to do with the returned value of x being
/"someVariable"/ and not /someVariable/, i.e.
2017 Jul 17
1
readLines without skipNul=TRUE causes crash
hi, thanks again for taking the time. since corrupted compression prompted
the segfault for me in the first place, i've just posted the text file
as-is. it's a 2.4GB file so to be avoided on a metered internet
connection. i've updated the bugzilla report at
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17311 with more
relevant info. these lines of code crash both windows R
2012 Jun 20
4
binary operators that never return missing values
Hi, I work with data sets with lots of missing values. We often need
to conduct logical tests on numeric vectors containing missing values.
I've searched around for material and conversations on this topic,
but I'm having a hard time finding anything. Has anyone written a
package that deals with this sort of thing? All I want are a group of
functions like the ones I've posted
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
I am stuck. The archive package won't compile for me on Ubuntu, and the CRANextra repo seems to be down so I cannot install packages on Windows right now. Perhaps you can zip the corrupt text file and put it online somewhere? Don't use the archive package to pack it since there seem to be issues with that tool on your machine.
I would discourage you from harassing the Brazilian
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
So you are saying there are two problems... one that produces a corrupt file from a valid compressed file, and one that segfaults when presented with that corrupt file? Can you please confirm the file name and run md5sum on it and share the result so we can tell when the file problem has been reproduced?
--
Sent from my phone. Please excuse my brevity.
On July 16, 2017 3:21:21 AM PDT, Anthony
2011 Jun 14
1
Putting commas in between character strings
I have a number of strings in a vector, and want the output to be seperated
by commas.
> t [1] "35004" "35005" "35006" "35007" "35010" "35014" "35016"
So I want want it to look like:
"35004", 35005", "35006", "35007",...
Can anyone help? I initially thought strsplit would be the
2013 Nov 05
2
Error message glmer using R: “ 'what' must be a character string or a function”
I am running a multi-level model. I use the following commands with
validatedRS6 as the outcome, random as the predictor and clustno as the
random effects variable.
new<-as.data.frame(read.delim("BABEX.dat", header=TRUE))
install.packages("lme4")
library(lme4)
model1<- glmer(validatedRS6 ~ random + (1|clustno), data=new,
family=binomial("logit"), nAGQ)
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
hi, the text file that prompts the segfault is 4gb but only 80,937 lines
> file.info( "S:/temp/crash.txt")
size isdir mode mtime
ctime atime exe
S:/temp/crash.txt 4078192743 FALSE 666 2017-07-15 17:24:35 2017-07-15
17:19:47 2017-07-15 17:19:47 no
On Sun, Jul 16, 2017 at 6:34 AM, Duncan Murdoch <murdoch.duncan at
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
hello, the last line of the code below causes a segfault for me on 3.4.1.
i think i should submit to https://bugs.r-project.org/ unless others have
advice? thanks
install.packages( "devtools" )
devtools::install_github("ajdamico/lodown")
devtools::install_github("jimhester/archive")
file_folder <- file.path( tempdir() , "file_folder" )
tf <-
2017 Jul 16
2
readLines without skipNul=TRUE causes crash
On 16/07/2017 6:17 AM, Anthony Damico wrote:
> thank you for taking the time to write this. i set it running last
> night and it's still going -- if it doesn't finish by tomorrow, i will
> try to find a site to host the problem file and add that link to the bug
> report so the archive package can be avoided at least. i'm sorry for
> the bother
>
How big is that
2010 Nov 15
5
How to Read a Large CSV into a Database with R
Hi, I'm working in R 2.11.1 x64 on Windows x86_64-pc-mingw32. I'm trying to
insert a very large CSV file into a SQLite database. I'm pretty new to
working with databases in R, so I apologize if I'm overlooking something
obvious here.
I'm trying to work with the American Community Survey data, which is two
1.3GB csv files. I have enough RAM to read one of them into memory,
2013 Jan 28
1
parse/eval and character encoded expressions: How to deal with non-encoding strings?
Hi,
I am intending to save a path-describing character object in a slot of a
class I'm working on. In order to have the option to use "system.file" etc
in such string-saved path definitions, I wrote this
ExpressionEvaluator <- function(x){
x <- tryCatch(
expr=base::parse(text=x),
error = function(e){return(as.expression(x))},
finally=TRUE)
return(x)
}
This