similar to: errors handling

Displaying 20 results from an estimated 30000 matches similar to: "errors handling"

2007 Sep 17
1
Importing a dataset
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070917/f6d8d606/attachment.pl
2005 Oct 21
2
read data from pdf file
Hi, I'm trying to read data from a PDF file.Is it possible to do it with R? Thanks, Marco [[alternative HTML version deleted]]
2005 Apr 02
2
Amount of memory under different OS
Hi, I have a problem: I need to perform a very tough analysis, so I would like to buy a new computer with about 16 GB of RAM. Is it possible to use all this memory under Windows or have I to install other OS? Thanks, Marco
2005 Oct 26
1
replacement in a dataframe
Hi,I want to replace some elements of a dataframe "a", using 2 index vectors ("x" and "y") and a vector of replacement ("z") of the same length of "x" and "y". I've tried a[cbind(x,y)]<-z, but it doesn't work.How can I do it in a simply way?Thanks,
2006 Aug 02
1
loop, pipe connection, quote/unquote
Hi all, I have the following problem. Inside R, I am trying to run a loop on several files. The data are stored in these files in a peculiar way, thus, at the same time I load the data, I would like to invoke a utility. I do this with "pipe". (The utility I am using is gbget from the package gbutils. It works correctly from shell, and it is not the problem.) The problem is that from
2011 Dec 24
2
readLines errors
Hi All, I met a problem using readLines function to return the data from Google maps. readLines(url(" http://ditu.google.cn/maps/geo?q=+qianshuichong,+guichi+anhui,+CN&output=csv&key=ABQIAAAAq8Fnd_oUka-7RdS6BrD7GBTqeABoQuNTXS36G_rkiwQnKRW6GBTkns8JpKz6y6dScgB8827dlddUlg"), n=1, warn=FALSE) [1] "200,4,30.6528380,117.4872250" The above code is ok because the
2009 May 11
1
R errors when trying to read a file
Colleagues, I have encountered a problem in version 2.9 of R, running in both Vista and OS X. My code is quite lengthy but the critical line is: if (file.exists(FILENAME)) readLines(FILENAME)) This triggers the error: Error in file(con, "r") : cannot open the connection Calls: readLines -> file Execution halted The file that it is reading is being created on the fly, then
2009 Jan 23
2
Write to multiple connections or multiple text files
Hi all, I want to modify a large number of text files (ca 4000) by replacing a value found on a particular line in them with a value from an R object. For a single file I would normally use: con<-file ("foo.txt", open="r+") content<-readLines(con) content[n]<-"test" writeLines(content,con) close(con) For repeating this for several files I can
2008 Nov 20
1
extracting data from a list of unformatted text files
Hi, I want to extract information from a number of text files in a folder. The files are named as : 82534.txt, 82555.txt, 8282787.txt etc. I give below a sample of the kind of the information in the text file : ######## #(a lot of preceding text) 2008-10-01????? 06:30:12??? ??? ??? ??? 2 of 3 page #(some lines of text - varies from file to file) sekvens??? 890 # lines of text sNo???? start???
2008 Dec 17
1
using dvi with latex object: directory not correctly set, maybe due to error in shQuote()
Dear friends of R, I want to produce a pdf file with the contents of a matrix. I employ the latex command in combination with dvi, both contained in the Hmisc package. It seems to me that the function does not correctly set the directory. > tbl.loc <- matrix(1:4, nc=2) > latex.obj <- latex(tbl.loc) > dvi(latex.obj) warning: extra args ignored after 'cd' H:\PROJECTS\data
2007 Dec 19
1
unexpected behavior from gzfile and unz
I get unexpected behavior from "readLines()" and "scan()" depending on how the file is opened with "gzfile" or "unz". More specifically: > file <- gzfile("file.gz") > readLines(file,1) [1] "a\tb\tc" > readLines(file,1) [1] "a\tb\tc" > close(file) It seems that the stream is rewound between calls to readLines.
2009 May 04
0
Handling Error Thrown After source(...), read.table(...), and readLines(...)
Finally, I'm getting to a point in working with R where I would like to start to add some smart and custom error handling. Specifically, I would like to add custom error handling to my code for source(...), read.table(...), and readLines(...) For example, right now I have the following: > postprocesspath<-c("C:/") > postprocess_scriptname<-c("Bob.R") >
2008 Nov 21
1
capturing stderr/stdout
Hi, I have an application in perl that prints some output to either stderr or stdout. Here's an example: # tmp.pl print STDERR "starting iterator\n"; for(my $i = 0; $i < 1000000; $i++) { print $i . "\n"; } # tmp.R con <- pipe("perl tmp.pl") r <- readLines(con, n = -1) close(con) However, the second line stalls until the perl for-loop finishes.
2018 May 26
2
Buffering in R 3.5 connections causes incorrect data in readChar
I noticed an issue where readChar does not return the correct value after a call to readline. It appears that readChar is not aware of the buffering, so it reads from the end of the buffer, rather than the current position in the file. This is a significant change of behavior from R-3.4.4. Below is a test case that I used to home in on the problem. --- p<-"test2.txt"
2004 Jan 12
1
ReadLines does not give results with urls
Hello, I am using R version 1.8.1 on a linux machine (Suse 8.2.). I have problems to use readLines() with urls. This seems to be a problem with our proxy-server. Downloading files work with download.file() with wget but not without: > download.file(url = "http://cran.r-project.org/src/contrib/PACKAGES", destfile = "test.txt", method = "wget", cacheOK = FALSE)
2011 Oct 03
2
file input with readLines
I am using readLines to read a fairly large ASCII file. readLines reads a fixed number of lines, then other R code processes the data, then readLines reads the same number of lines again, then other R code processes the data, then .... Sort of like: conn<-file('filename','r') for (chunk in 1:100000) { Lines<-readLines(conn,n=25) # process "Lines" }
2013 Nov 05
4
Handling closed clients
We have a service that clients use to upload files. We have a couple of clients that are on slow links and so their upload times out. We get errors in the logs that I''d like to get rid of. I was hoping that the recent commit 24b9f66dcdda44378b4053645333ce9ce336b413 would help us, but it does not. After digging in a bit, I have some ideas about why and a patch I''d like comments
2024 Oct 25
1
readLines() and unz() and non-empty final line
Hi again, The unz connection is non-blocking by default. I checked do_unz which calls R_newunz which calls init_con and the only place in any of those functions that sets 'blocking' is init_con which sets it to FALSE: https://github.com/wch/r-source/blob/0c26529e807a9b1dd65f7324958c17bf72e1de1a/src/main/connections.c#L713 I'll open an issue on R-bugzilla and see if they're
2018 Jun 04
2
encoding argument of source() in 3.5.0
On R 3.5.0 (Mac) The issue appears when using the default (libcurl) method and specifying the encoding Note that using method='internal' causes a segfault if used in conjunction with encoding. (and works when encoding is not set) urlR <- "http://home.versanet.de/~s-berman/source2.R" # works url_default <- url(urlR) scan(url_default, "") # Read 7 items # [1]
2008 May 14
3
Bug#481200: xend: Handle unspecified timer_mode domain platform parameter.
Package: xen-3 Severity: important Tags: patch Cheers, Marco Sinhoreli -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.18.8-xen (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash -------------- next part --------------