similar to: Question about readLines

Displaying 20 results from an estimated 7000 matches similar to: "Question about readLines"

2010 Nov 07
2
mean on a plot
Hi, i need to draw a plot with means of values, reading a table from datafile. Example of datafile: Days Weight 0 178.00 0 250.00 0 242.00 0 239.00 0 223.00 0 188.00 0 237.00 0 212.00 0 273.00 0 191.00 0 173.00 0 233.00 0 227.00 0 253.00 0 232.00 4 177.00 4 249.00 4 241.00 4 238.00 4 222.00 4 188.00 4 236.00 4 211.00 4 272.00 4 190.00 4 172.00 4 232.00 4 226.00 4 252.00 4 231.00 if i use
2001 Sep 18
5
Newbie question - running MSMONEY fails.
Hi, I've recently installed the latest version of WINE (from LinuxFormat Mag), and I can run some app's (sol.exe, notepad etc). However, when I try to run 'larger' apps I run into problems. Specifically I'm trying to run MSMONEY 2001. I cd to c:/program files/microsoft money/system then run wine --winver win98 msmoney.exe and I get the following:
2011 Mar 11
3
How to source a part of the file
I have a text file of R commands. Some times I only want to run a few lines of the R commands in an existing R session and wonder whether there is a simple way to do this. To run a few lines in a new session of R, I could use sed to pick up the lines from the file and pipe them into R. source() does not allow me to specify which lines to be included/excluded. Is there any function that is
2002 Dec 19
2
More on scan()
Hi, If I have a CSV file which has several comments at the top, and the data start immediately after the line: @DATA Is it possible to use the scan() command to get the CSV data into R, by only reading the lines after @DATA? If so, how can I do it? Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it
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)
2009 Nov 23
4
Check if string has all alphabets or numbers
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/470946bc/attachment-0001.pl>
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" }
2010 May 31
2
Ignoring initial rows in a text file import
I am trying to import a series of text files generated by stimulus presentation software. The problem that I am having is that the number of rows I need to skip is not fixed (depending on subject's pretest behavior) nor is the first row of the data I want always the same (the stimuli were presented in random order). So I need to bring in the .txt file (using readLines?), look for the row
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 Oct 01
2
The problem of readLines
Dear R-users, I use "readLines" to read data, but when processing the large data set, there are few files which can not be readed in: 48: In readLines(name_c[i]) ... : incomplete final line found on 'C:/Documents and Settings/lma/My Documents/habitdata/244052900243997/calllog/calllog_log-20050505T121611.txt' ... Whats the problem about this? Regards, Tammy
2018 Apr 26
2
readLines() for non-blocking pipeline behaves differently in R 3.5
The issue is that readLines() tries to seek (for reasons I don't understand) in the non-blocking case, but silently fails for "stdin" since it's a stream. This confused the buffering logic. The fix is to mark "stdin" as unable to seek, but I do wonder why readLines() is seeking in the first place. Anyway, I'll get this into patched ASAP. Thanks for the report.
2018 May 10
2
readLines() behaves differently for gzfile connection
When I read a .gz file with readLines() in 3.4.3, it returns text (and a warning). In 3.5.0, it gives a warning, but no text. Is this expected behavior or a bug? 3.4.3: > source_file = "1k_annotation.gz" > readfile_con <- gzfile(source_file, "r") > readLines(readfile_con, n = 5) [1] "#chr\tpos\tref\talt\t <truncated output here> Warning message: In
2013 Apr 10
1
Issue with Control-Z in a text file on Windows - readLines() appears to truncate
Working on Windows I have had to deal with CSV files that, unfortunately, contain embedded Control-Zs, i.e. ASCII character 26 in decimal, and the readLines() function in R on Windows (2.15.2 and 3.0.0) appears to truncate at the control-Z. There is no problem at all on Ubuntu Linux with R 3.0.0. Am I mistaken or is this genuine? # Create a small file with embedded Control-Z h3 <-
2018 May 28
2
readLines function with R >= 3.5.0
>>>>> Martin Maechler >>>>> on Mon, 28 May 2018 10:28:01 +0200 writes: >>>>> Ralf Stubner >>>>> on Fri, 25 May 2018 19:18:58 +0200 writes: >> Dear all, I would like to draw you attention to this >> question on SO: >>
2017 Dec 14
2
cannot destroy connection (?) created by readLines in a tryCatch
Consider this code. This is R 3.4.2, but based on a quick look at the NEWS, this has not been fixed. tryCatch( readLines(tempfile(), warn = FALSE)[1], error = function(e) NA, warning = function(w) NA ) rm(list=ls(all.names = TRUE)) gc() showConnections(all = TRUE) If you run it, you'll get a connection you cannot close(), i.e. the last showConnections() call prints: ?
2018 May 10
1
readLines() behaves differently for gzfile connection
You bet - it's available on github at https://github.com/UW-GAC/wgsaparsr/blob/master/tests/testthat/1k_annotation.gz -Ben On Thu, May 10, 2018 at 4:17 PM, Michael Lawrence <lawrence.michael at gene.com > wrote: > Would it be possible to get that file or a representative subset of it > somewhere so that I can reproduce this? > > Thanks, > Michael > > On Thu, May
2010 May 05
2
readLines with space-delimiter?
Hi, I am reading a large space-delimited text file into R (41 columns and many rows) and need to do run each row's values through another R object and then write to another text file. So, far using readLines and writeLines seems to be the best bet. I've gotten the data exchange working except each row is read in as one 'chunk', meaning the row has all values between two quotes
2016 Jun 06
2
readlines() truncates text file with Codepage 437 encoding
Hello r-devel, The attached Code page 437-encoded file contains 245 characters (including the final newline), but readLines only reads 242 of them: > test_text <- readLines(file('437__characters.txt', encoding='437')) Warning message: In readLines(file("437__characters.txt", : incomplete final line found on '437__characters.txt' > test_text [1]
2004 May 07
1
Problem (Bug?) with readLines on Suze
Hello, I called readLines on Suze 9.0 with a directory as parameter instead of a file. R freezed for a very long time; this morning I could read following error message: Error in readLines(paste("/home/",foo,"/",sep="")) : cannot allocate buffer in readLines under W2K I get a more logical error ("cannot open file") (I'm still using R 1.8.1)
2024 Oct 24
2
readLines() and unz() and non-empty final line
Dear list, I'm seeing a strange interaction with readLines() and unz() when reading a file without an empty final line. The final line gets dropped silently: > cat("hello", file = "hello.txt") > zip("hello.zip", "hello.txt") adding: hello.txt (stored 0%) > readLines(unz("hello.zip", "hello.txt")) character(0) The