similar to: Question about type conversion in read.table with columns that contain "+" and "-" in R > 2.7

Displaying 20 results from an estimated 40000 matches similar to: "Question about type conversion in read.table with columns that contain "+" and "-" in R > 2.7"

2005 Oct 27
3
Strange behaviour of type conversion (PR#8256)
Where is my error?? I have a strange behaviour in R, looks like type conversions are messed = up. Maybe i just make a stupid mistake, but help would be appreciated. To reproduce: expected: > typeof(3) [1] "double" > as.integer(3) [1] 3 > typeof((0.3/0.1)) [1] "double" !!!! strange: > as.integer((0.3/0.1)) [1] 2 also for trunc: >trunc(c(5,7)) [1] 5 7
2008 Jun 30
1
2.7.0 breaks read.table
Hi, yes a bold statement, but I get different behaviour from 2.6.2 and 2.7.0 in read.table, and I don't find any documentation in http://cran.r-project.org/src/base/NEWS. A file like (space delimited): foo + . bar - . 2.7.0: > tab <- read.table("test.txt",as.is=TRUE) > tab V1 V2 V3 1 foom 0 0 2 bar 0 0 while until now and on 2.6.2 > tab <-
2001 Aug 24
1
RFC: type conversion in read.table
Currently read.table is rather limited in its type conversion. The algorithm is 0) Read as character 1) Try to convert to numeric. If that works, quit 2) Convert to factor unless !as.is. I am thinking about adding more flexibility and more classes by the following two changes. A) Anticipating the arrival of classes for all R objects, add an argument say `colClasses' that allows the user to
2010 Nov 23
0
read.table / type.convert: Unexpected column class
Hi all, I stumbled across the following, in my opinion surprising, behaviour of read.table: > data <- read.table(stdin(), sep=",") 0: 1, 2, 3 # Some comment 1: > sapply(data, class) V1 V2 V3 "integer" "integer" "numeric" I was surprised to find that V3 has class "numeric" despite its apparent integer value. I
2018 Apr 07
2
OpenSSH private key format errors with LibreSSL 2.7
On Friday 06 April 2018 21:31:01 Bernard Spil wrote: > Hi, > > When using OpenSSH with LibreSSL 2.7.x it cannot read existing RSA and > ECDSA private keys. > > Error loading key "./id_rsa": invalid format > > Rebuilding OpenSSH with LibreSSL 2.6.x fixes the issue. I had fixed this > issue early on with LibreSSL 2.7 by converting the key to "new
2013 Jun 10
1
DAHDI-linux 2.7 compile error with CONFIG_DAHDI_NET enabled
Not sure how I should officially report this, but I'm getting a compile error with DAHDI-linux 2.7 when I define CONFIG_DAHDI_NET in include/dahdi/dahdi_config.h. I am able to compile successfully when I leave it undefined, but I need to be able to use the network support. <snipped> /oct6100_api/oct6100_tsst.o AR /tmp/dahdi-linux-2.7.0-net/drivers/dahdi/oct612x/lib.a
2013 Oct 18
1
read table and import of a text file
Hi, Assuming that you provided the sample data from the file. temp <- readLines(textConnection("#Hogd/met, Temp, 005[M], Value #Hogd/met, Difftemp, 051[M], Value BA0+ 1 MTEMP005 1 [deg.C] 2 MDTMP051 1 [deg.C] EOH 891231, 2400, -1.5, -0.21, 900101, 0100, -1.4, -0.25, 900101, 0200, -1.6, -0.28, 900101, 0300, -1.7, -0.25, 900101, 0400, -2.1, -0.0999999, 900101, 0500, -2.3, -0.0899999,
2002 Oct 10
1
read.table conversion question
Hi! I would like to read data read with read.table row by row into a c() vector. data<-read.table("test",header=FALSE) for (i in 1:length(data[[1]])) { temp <- ?? do something with temp } data[1,] gives me V1 V2 V3 V4 V5 1 1 -1 -1 -1 0.33 c[temp[1],temp[2]) gives me $V1 [1] 1 $V2 [1] -1 Sorry if that's well known but I can't still figure it
2010 Jun 29
1
read.table / type.convert with NA values
Hello, While assisting a fellow R-helper off list, I narrowed down an issue he was having to the following behavior of type.convert, called through read.table. This is using R 2.10.1, if newer versions don't exhibit this behavior, apologies. # generates numeric vector > type.convert(c("123.42", "NA")) [1] 123.42 NA # generates a numeric vector, notice the
2009 Feb 19
1
Read.table not reading in all columns
Hello, I am reading in a file called fit2.txt (Limma). fit2.txt has 38 columns but when I dim(fit2) I only get 6 columns. The first column that it does not read in is df.residual. fit2<-read.table(fit2, file="fit2.txt",sep="\t",quote="",comment.char="",as.is=TRUE) The first few lines of fit2.txt (does not include all 38 columns) looks like this:
2012 Feb 28
1
Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names
Hey, I just googled my error and many things came up. I followed the leads and read the ?read.delim page; I tried changing header = TRUE, and row.names = TRUE-- but I've still been having trouble fixing it, so I would greatly appreciate any help you can provide. Here is my code: rm(list=ls()) source("../../functions.R") uncurated <-
2016 Apr 29
0
selecting columns from a data frame or data table by type, ie, numeric, integer
Hi, I was able to replicate the solution as suggested by William in case of data.frame class, not in case of data.table class. In case of data.table, I had to do some minor changes as shown below. library(data.table) a <- 1:10 b <- c("a","b","c","d","e","f","g","h","i","j") c <- seq(1.1,
2018 Apr 07
6
OpenSSH private key format errors with LibreSSL 2.7
On 2018-04-07 11:24, Bernard Spil wrote: > On 2018-04-07 9:04, Joel Sing wrote: >> On Friday 06 April 2018 21:31:01 Bernard Spil wrote: >>> Hi, >>> >>> When using OpenSSH with LibreSSL 2.7.x it cannot read existing RSA >>> and >>> ECDSA private keys. >>> >>> Error loading key "./id_rsa": invalid format
2000 Aug 31
1
Unable to read.table with > 256? columns (PR#649)
Full_Name: Mark Smucker Version: 1.0.1 OS: Windows NT 4 sp 6 Submission from: (NULL) (216.122.46.200) I'm trying to read in a large matrix (800 x 800 or bigger) and R prints an error telling me that my rows are not all the same length. I've double checked the text file using gawk and it tells me that they are all the same. When I pair it down to 247 x 247, then it works, but not when
2008 May 13
2
(PR#11281) Bug in R 2.7 for over long lines (crasher+proposed fix!)
>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk> >>>>> on Tue, 13 May 2008 07:32:43 +0100 (BST) writes: BDR> This example does not crash in R 2.7.0, R-patched nor BDR> R-devel (r45677) for me (x86_64 F8 Linux.) It also BDR> does not crash with the CRAN build of R 2.7.0 on BDR> Windows XP. Neither does it
2005 Oct 27
2
Critical Bug in type conversions: as.integer, trunc, ... (PR#8255)
Full_Name: Grischa T?dt Version: 2.1.1 OS: windows XP Submission from: (NULL) (192.108.25.32) I have a strange behaviour in R, looks like type conversions are messed up. To reproduce: expected: > typeof(3) [1] "double" > as.integer(3) [1] 3 !!!! strange: > typeof((0.3/0.1)) [1] "double" > as.integer((0.3/0.1)) [1] 2 also for trunc: >trunc(c(5,7))
2002 Nov 27
1
read.table: colClasses when num. of columns is unknown
Hi, I am looking for a way to read tables that have general structure of characterTag num1 num2 ... i.e. one character column followed by an unknown to the caller (but fixed throughout the file) number of numeric columns. I wanted to improve the speed of read.table by using colClasses, but that seemed to require knowledge of the actual number of columns in the file. For example I tried
2016 Apr 29
0
selecting columns from a data frame or data table by type, ie, numeric, integer
> dt1[ vapply(dt1, FUN=is.numeric, FUN.VALUE=NA) ] a c 1 1 1.1 2 2 1.0 ... 10 10 0.2 Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Apr 29, 2016 at 9:19 AM, Carl Sutton via R-help < r-help at r-project.org> wrote: > Good morning RGuru's > I have a data frame of 575 columns. I want to extract only those columns > that are numeric(double) or integer to do
2008 May 07
3
Version 2.7 for Windows (PR#11399)
Full_Name: Charles Man Version: 2.7 OS: XP and Vista Submission from: (NULL) (219.79.247.35) After installing the latest 2.7 on both Win XP SP2 and Win Vista Business SP1, the program cannot load. An error message shows: "Fatal Error: Unable to Restore a Saved File". I have to fall back to version 2.6
2010 Oct 04
3
read columns of quoted numbers as factors
Suppose I have a data file (possibly with a huge number of columns), where the columns with factors are coded as "1", "2", "3", etc ... The default behavior of read.table is to convert these columns to integer vectors. Is there a way to get read.table to recognize that columns of quoted numbers represent factors (while unquoted numbers are interpreted as