similar to: excluding factor levels with read.table() and colClasses=

Displaying 20 results from an estimated 4000 matches similar to: "excluding factor levels with read.table() and colClasses="

2004 Sep 08
1
Case-Cohort Analysis
Hi All, I am in the middle of doing an analysis of a Case-Cohort design. I had three questions about the analysis: a) Does any one know of some public code for developing the patient risk sets (indexed by failure time) or is there a better way to organize the data? b) I was planning to use the Barlow weighting method. Has this or any other weighting method (Prentice, Self-Prentice) been
2007 Oct 23
2
Using a data frame in a function call
Hi, I am writing a basic function to extract the z scores for some linear regression coefficients: zscore<-function( y, x) { lm<-lm( y ~ x ) z <- coef(lm)/sqrt(diag(vcov(lm))) return(z) } I would like to pass a dataframe to the function as a argument so the function call changes from zscore(df$y1,df$x1) to zscore(y1,x1,data=df) but I am not sure how to reference the data
2008 Nov 18
1
Problem with the Linux R 2.8.0 rpm for 64 bit REL 4
Hi, I am trying to update my version of R on Centos 4. $uname -a Linux 2.6.9-78.0.5.ELsmp #1 SMP Wed Oct 8 07:06:30 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux I tried to update the current version of R (2.6.2) which was installed locally as an rpm $R --version R version 2.6.2 (2008-02-08) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 I used yum to
2008 Sep 18
1
caret package: arguments passed to the classification or regression routine
Hi, I am having problems passing arguments to method="gbm" using the train() function. I would like to train gbm using the laplace distribution or the quantile distribution. here is the code I used and the error: gbm.test <- train(x.enet, y.matrix[,7], method="gbm", distribution=list(name="quantile",alpha=0.5), verbose=FALSE,
2019 Jul 23
2
[RFC] A new multidimensional array indexing intrinsic
After having spoken to Johannes, I think we had a classic misunderstanding on what "extending" means. 1. The most obvious why for me was changing GEP to allow variable-sized multi-dimensional arrays in the first argument, such as %1 = getelementptr double, double* %ptr, inrange i64 %i, inrange i64 %j (normally GEP would only allow a single index argument for a pointer-typed base
2002 Mar 18
1
line breaks
I have a question about the function of line feeds/carriage returns in an all linux (R, vi to write scripts) environment. In my scripts I have a few functions, using { or ( to wrap commands on the next line. Usually this is fine, but sometimes R appears confused by line wrappings (more likely of course it is me who is confused). I tried ';' to explictly break the line, but no dice. An
2019 Jul 09
2
[LLVM] Infinite loop during LLVM InstructionCombining pass optimization
If you're able to reproduce the infinite loop with -O3 then you should be able to dump out the IR that causes `opt -instcombine` to infloop, unless the bug is truly esoteric (e.g. only caused by a specific use-list ordering). Maybe take a closer look at the output from `opt -print-before-all -O3`? Alternatively you can use bugpoint to minimize the IR to get a small reproducer that causes
2004 Oct 11
4
colClasses
Hi I am trying to read a data frame from a text editor in to R. I want some of the columns to be read in as "character" not numeric. I figured that I can do that by using "colClasses" in "read.table" command. However, I couldn't find out how to use "colClasses". e.g. say I have 5 column in the data file. I want 1st and 3rd column to be read in as
2006 Sep 26
2
colClasses: supressed 'NA'
Hi, The colClasses seem to be supressing 'NA' vlaues. How do I fix this? R script and first 5 lines of output is below. File "test2.dat" has blanks that are read as "NA" when I do not use 'colClasses', but as blanks when I use 'colClasses'. temp.df <- read.fwf("test2.dat", width=c(10,1,1,1,1,2,2,3,3,1),
2019 May 24
2
Delinearization validity checks in DependenceAnalysis
[CC bollu, mferguson, shil] Am Do., 23. Mai 2019 um 17:13 Uhr schrieb Bardia Mahjour < bmahjour at ca.ibm.com>: > Thanks David and Michael for the clarification. > > I think I understand the rational behind those checks in delinearization > now. > > > Some other languages have stronger guarantees about their array > dimensions accesses being in range. But this being
2006 Jun 21
5
colClasses
Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data Import/Export and can't figure out what the colClasses syntax is. Thanks, john [[alternative HTML version deleted]]
2004 Sep 08
1
A couple of issues with colClasses/setAs
Consider this: $ cat test.dat 1 a 2 b Now, we want to read the 2nd column as a factor and ignore the first (since it's just a sequential ID). We can't just put "factor" among the colClasses (would have been nice), so let's try this instead > setAs("character","factor",as.factor) Arguments in definition changed from (x) to (from) >
2017 Oct 24
2
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
Jeff, Thank you for your reply. The intent was to construct a minimum reproducible example. The same warning occurs when the 'file' argument points to a file on disk with a million lines. But you are correct, my example was slightly malformed and in fact gives an error under R version 3.2.2. Please allow me to try again; in older versions of R, ?? > read.table(file =
2012 Sep 14
1
Any way to get read.table.ffdf() (in the ff package) to pass colClasses or comment.char parameters through to read.fwf() ?
Hi everyone, my apologies if I'm overlooking something obvious in the documentation. I'm relatively inexperienced with the (awesome) ff package. My goal is to use the read.table.ffdf() function to call the read.fwf() function and pass through the colClasses and comment.char arguments. The code below shows exactly what doesn't work for me. If the colClasses and comment.char
2017 Oct 24
0
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
>>>>> Benjamin Tyner <btyner at gmail.com> >>>>> on Tue, 24 Oct 2017 07:21:33 -0400 writes: > Jeff, > Thank you for your reply. The intent was to construct a minimum > reproducible example. The same warning occurs when the 'file' argument > points to a file on disk with a million lines. But you are correct, my >
2017 Oct 23
2
read.table(..., header == FALSE, colClasses = <vector with names attribute>)
Hello I noticed that starting with R version 3.3.0 onward, this generates a warning: ?? > txt <- c("a", "3.14") ?? > read.table(file = textConnection(txt), header = FALSE, colClasses = c(x = "character", y = "numeric")) the warning is "not all columns named in 'colClasses' exist" and I guess the change was made in response
2005 Apr 18
2
colClasses = "Date" in read.delim, how to pass date-format?
Hi I have a huge data-set with one column being of type date. Of course I can import the data using this column as "factor" and then convert it later to dates, using: sws.bezuege$FaktDat <- dates(as.character(sws.bezuege$FaktDat), format = c(dates = "d.m.y")) But the conversion requires a huge amount of memory (and time), therefore I would
2010 Feb 11
2
trouble with read.table and colClasses='raw'
Hi all, First off, it is surprising that there are no examples of how to use read.table() under ?read.table ! I am trying to read in a flat file of type 'raw'. It has 1000 rows and 600K columns. I have the RAM to accomplish this, but can't get the data into R using read.table: x <- read.table("data",header=TRUE,colClasses=rep(,600000)) #returns error: no method or
2004 Jul 28
1
read.table() and NULL for colClasses
Hi, is there are reason for not supporting NULL or "NULL" values for argument colClasses in read.table(), much like you can use NULL values for argument 'what' in scan()? This would help quite a bit when reading large data files where only a few columns are of interest. I've modfied read.table() to so it calls scan(what=...) also with NULLs for the fields to be skipped.
2007 Oct 09
1
Read in date fomat while colClasses="character"
Hi R users, I am using xlsReadWrite to read a particular excel file. In one of the columns I have dates ( say col=5). Now date column is read by default as numeric. So I used dateTimeAs= "isodatetime". This enables reading in the date format. However in the earlier column (say col=1) I have data which however starts from row 10. So to read data from column one I use