similar to: Header = T

Displaying 20 results from an estimated 30000 matches similar to: "Header = T"

2009 Oct 26
2
exclude data for boxplot stats using mathematical operator
Readers, I have a data set as follows: 1,1 2,2 3,3 4,4 5,3 6,2 7,-10 8,-9 9,-3 10,2 11,3 12,4 13,5 14,4 15,3 16,2 17,1 I entered this data set using the command 'read.csv'. I want to exclude values fewer than zero in column 2 so then I tried the following command: boxplot.stats(x[>0,2],do.conf=FALSE) Error: syntax error, unexpected GT, expecting ',' in
2008 Sep 19
4
Novice question about getting data into R
I found it easy to use R when typing data manually into it. Now I need to read data from a file, and I get the following errors: > refdata = > read.table("K:\\MerchantData\\RiskModel\\refund_distribution.csv", header > = TRUE) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 42 elements > refdata = >
2006 Oct 23
1
unexpected read.csv behavior
Example data in a recent post was: LandFill Ruminants United States (USA) 7777.214280 5528.16 France 200.527083 1299.87 Australia 185.878368 2448.17 Russian Federation 1752.833400 2024.29 Argentina 283.987320 2567.02 Brazil 1048.422480 8839.61 Colombia 265.125000 1307.61 Mexico
2012 Dec 19
2
read.csv reads more rows than indicated by wc -l
When I have a csv file that is more than 6 lines long, not including the header, and one of the fields is blank for the last few lines, and there is an extra comma on of the lines with the blank field, read.csv() makes creates an extra line. I attached an example file; I'll also paste the contents here: A,apple A,orange A,orange A,orange A,orange A,,, A,, ----- wc -l reports that this file
2012 Apr 29
1
CForest Error Logical Subscript Too Long
Hi, This is my code (my data is attached): library(languageR) library(rms) library(party) OLDDATA <- read.csv("/Users/Abigail/Documents/OldData250412.csv") OLDDATA$YD <- factor(OLDDATA$YD, label=c("Yes", "No"))? OLDDATA$ND <- factor(OLDDATA$ND, label=c("Yes", "No"))? attach(OLDDATA) defaults <- cbind(YD, ND) set.seed(47) data.controls
2008 Jul 03
1
randomForest.error: length of response must be the same as predictors
My data looks like: A,B,C,D,Class 1,2,0,2,cl1 1,5,1,9,cl1 3,2,1,2,cl2 7,2,1,2,cl2 2,2,1,2,cl2 1,2,1,5,cl2 0,2,1,2,cl2 4,2,1,2,cl2 3,5,1,2,cl2 3,2,12,3,cl2 3,2,4,2,cl2 **The steps followed are: trainfile <- read.csv("TrainFile",head=TRUE) datatrain <- subset(trainfile,select=c(-Class)) classtrain <- (subset(trainfile,select=Class)) rf <- randomForest(datatrain, classtrain)
2018 Mar 29
0
Creating the right table from lapply list
Perhaps this toy example will help: ## example data output <- list(1:5, 1:7, 1:4) lens <- lapply(output, length) maxlen <- max(unlist(lens)) outputmod <- lapply(output, function(x, maxl) c(x, rep(NA, maxl-length(x))), maxl=maxlen) outputmat <- do.call(cbind, outputmod) write.csv(outputmat, na='') The idea is to pad the shorter vectors with NA (missing) before converting
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 <-
2013 Jul 23
0
[LLVMdev] [Patch] WinCOFFObjectWriter: fix for storing pointer to string table in header name field
On Tue, Jul 23, 2013 at 12:48 PM, Nico Rieck <nico.rieck at gmail.com> wrote: > On 23.07.2013 18:43, Reid Kleckner wrote: > >> Is there a problem if the string is not null terminated? If not, you can >> snprintf it right into place instead of doing sprintf+mempcy. >> > > snprintf always null-terminates (and truncates if there's not enough > space).
2006 Oct 26
3
Read.csv
Are there ways to load a csv file without row.names by read.csv? Thanks. [[alternative HTML version deleted]]
2013 Apr 16
4
Singular design matrix in rq
Quantreggers: I'm trying to run rq() on a dataset I posted at: https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing (it's a 1500kb csv file named "singular.csv") and am getting the following error: mydata <- read.csv("singular.csv") fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1) > Error in rq.fit.br(x, y, tau = tau, ...) :
2002 Jan 15
3
Getting started with R
I've got a background in computer science & have been using Linux for nearly a decade. I'm working on a Ph.D. in education and technology and I essentially live in emacs and do all of my writing in LaTeX. To me R seems like the perfect stats package. Unfortunately, the learning curve is killing me. I feel like that if I'd waded through pulling down menus in SPSS or SAS I could
2006 Nov 29
4
Importing Database into Rails App database?
I''m working on an app that uses info from a government database. For a variety of reasons (not the least of which is that their database is in MS Access), I can''t simply write a wrapper around the legacy database. Instead, we''re looking to have an "import" script in the Rails environment (it''s fine if it''s run from the server and through the
2012 Nov 12
5
Matrix to data frame conversion
I have a matrix which I wanted to convert to a data frame. As I could not succeed and resorted to export to csv and reimport it again. Why did I fail in the attempt and how can I achieve what I wanted without this roundabouts? The original matrix: > str(comb_model0) num [1:90, 1:4] 3.5938 0.0274 0.0342 0.0135 0.0207 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:90]
2010 May 31
2
accessing a data frame with row names
Readers, I have entered a file into r: ,column1,column2 row1,0.1,0.2 row2,0.3,0.4 using the command: dataframe<-read.table("/path/to/file.csv",header=T,row.names=1) When I try the command: dataframe[,2] I receive the response: NULL I was expecting: row1 0.2 row2 0.4 What is my error with the syntax please? Yours, r251 mandriva2009
2009 Jan 14
1
setting header in views?
currently iam using FasterCSV to render csv pages format.csv do csv_string = FasterCSV.generate do |csv| # header row csv << @query_result[0].keys @query_result.each do |x| csv << x.values end end #send it to the browser send_data csv_string, :type => ''text/csv;
2017 Aug 10
1
Import selected columns from sas7bdat file
hi, the sas universal viewer might be a free, non-R way to convert a sas7bdat file to non-proprietary formats, not sure if it's windows-only. those other formats should be easier to import only a subset of columns into R.. https://support.sas.com/downloads/browse.htm?fil=&cat=74 On Thu, Aug 10, 2017 at 7:42 AM, peter dalgaard <pdalgd at gmail.com> wrote: > I had a look at this
2010 Aug 12
2
Append to csv without header
Hi, I am writing a function that writes to a csv file for every call. However, for the subsequent calls, I want to append the data to the existing csv file without appending the column names again. I tried searching in the previous posts, but I am stuck with different errors. Here is what I am doing (dataF is a data-frame):- outputFilePath <- paste(getwd(), "/",
2004 Aug 26
1
EM norm package (NA/NaN/Inf in foreign function call (arg 2))
Greetings! I am bootstrapping and I am using EM in the norm package to fill in missing data for a financial time series with each step of the loop. For the most part EM works fine for me, but the following error message is guaranteed before I hit the 200th scenario: Iterations of EM: 1...2...3........348...349...Error: NA/NaN/Inf in foreign function call (arg 2) The following code should
2013 Apr 26
3
csv file with two header rows
Is there a way to use read.csv() on such a file without deleting one of the header rows? Thanks.