On Thu, 2 Sep 2021, Enrico Schumann wrote:
There is no column 'ht'.
Enrico,
New eyeballs caught my change in variable name that I kept missing.
Thanks very much,
Rich
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://st
On Thu, 02 Sep 2021, Rich Shepard writes:
> The first three commands in the script are:
> stage <- read.csv('../data/water/gauge-ht.dat', header
> = TRUE, sep = ',', stringsAsFactors = FALSE)
> stage$sampdate <- as.Date(stage$sampdate)
> stage$ht <- as.numeric(stage$ht, length = 6)
>
> Running the
On Thu, 02 Sep 2021, Rich Shepard writes:
> The first three commands in the script are:
> stage <- read.csv('../data/water/gauge-ht.dat', header
> = TRUE, sep = ',', stringsAsFactors = FALSE)
> stage$sampdate <- as.Date(stage$sampdate)
> stage$ht <- as.numeric(stage$ht, length = 6)
>
> Running the
The first three commands in the script are:
stage <- read.csv('../data/water/gauge-ht.dat', header = TRUE, sep = ',',
stringsAsFactors = FALSE)
stage$sampdate <- as.Date(stage$sampdate)
stage$ht <- as.numeric(stage$ht, length = 6)
Running the script produces this error:
source('stage.R')
Erro
On Thu, Jul 16, 2020 at 5:15 PM Ista Zahn wrote:
>
> On Thu, Jul 16, 2020 at 8:18 AM Rui Barradas wrote:
> >
> > Hello,
> >
> > Thanks, but no, download.file still gives 403 Forbidden with both method
> > = "libcurl" and method = "wget".
>
> I think that makes it "not an R question". Ask on
> htt
On Thu, Jul 16, 2020 at 8:18 AM Rui Barradas wrote:
>
> Hello,
>
> Thanks, but no, download.file still gives 403 Forbidden with both method
> = "libcurl" and method = "wget".
I think that makes it "not an R question". Ask on
https://unix.stackexchange.com/ maybe?
Best,
Ista
>
> Rui Barradas
>
>
On 7/15/2020 4:02 PM, Rui Barradas wrote:
Hello,
R 4.0.2 on Ubuntu 20.04 LTS, sessionInfo below.
I'm also unable to read the file with Rscript from the Ubuntu terminal
but the error is not the same as the OP's.
The first try was a file test1.R with the following commands.
x<-"https://old.n
Hello,
Thanks, but no, download.file still gives 403 Forbidden with both method
= "libcurl" and method = "wget".
Rui Barradas
Às 05:31 de 16/07/20, Jeff Newmiller escreveu:
Perhaps read FAQ 7.43? [1]
[1]
https://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-enable-secure-https-downloads-
Perhaps read FAQ 7.43? [1]
[1]
https://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-enable-secure-https-downloads-in-R_003f
On July 15, 2020 4:02:27 PM PDT, Rui Barradas wrote:
>Hello,
>
>R 4.0.2 on Ubuntu 20.04 LTS, sessionInfo below.
>
>I'm also unable to read the file with Rscript from th
Hello,
R 4.0.2 on Ubuntu 20.04 LTS, sessionInfo below.
I'm also unable to read the file with Rscript from the Ubuntu terminal
but the error is not the same as the OP's.
The first try was a file test1.R with the following commands.
x<-"https://old.nasdaq.com/screening/companies-by-name.aspx?
I may be wrong, but probably better posted on r-sig-debian rather than here.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Jul 15, 2020 at 8:44 AM Sam H
Hi,
I am trying to download some data using read.csv and it works perfectly in
RStudio and fails in the R console in the terminal in Ubuntu 18.04 after
upgrading from R 3.6.3 to 4.0.2. Before upgrading this worked in the R
console in the terminal also without any issues.
Why would that be? How to
-help (r-help@r-project.org)
Subject: Re: [R] read.csv and Decimal places
... and see also ?print.data.frame , the "digits" argument.
See also ?str
It might be worth your while spending time with an R tutorial or two that
covers such topics, i.e. distinguishing between an object and v
... and see also ?print.data.frame , the "digits" argument.
See also ?str
It might be worth your while spending time with an R tutorial or two that
covers such topics, i.e. distinguishing between an object and various (S3)
methods that "represent" it, such as print(), summary(), plot() etc.
-- B
The stored numbers are correct. They are rounded on printing.
print(RevFCast, digits=17)
See
?options
And scroll down to digits.
On Mon, May 7, 2018 at 11:50 Bill Poling wrote:
> Hi, Novice UsR here.
>
> I have a csv file that contains 13 columns of numeric data that have
> decimal places (for
Hi, Novice UsR here.
I have a csv file that contains 13 columns of numeric data that have decimal
places (for the most part).
After reading in the file
RevFCast = read.csv("RevAnalysisNov2016_April2018.csv", header=TRUE, dec = ".",
stringsAsFactors=FALSE)
and viewing the data
View(RevFCast)
S
On Tue, Dec 10, 2013 at 10:06 AM, Jeff Newmiller
wrote:
> It is bad netiquette to hijack an existing thread for a new topic. Please
> start a new email thread when changing topics.
>
> If your data really consists of what you show, then read.csv won't behave
> that way. I suggest that you open t
It is bad netiquette to hijack an existing thread for a new topic. Please start
a new email thread when changing topics.
If your data really consists of what you show, then read.csv won't behave that
way. I suggest that you open the file in a text editor and look for odd
characters. They may be
Why does R interpret a column of numbers in a csv file as a factor when
using read.csv() and how can I prevent that. The data looks like
9928
3502
146
404
1831
686
249
I tried kick=read.csv("kick.csv",stringsAsFactors =FALSE)
as well as
kick=read.csv("kick.csv")
Thanks
On Mon, Dec 2, 2013 at 5
here are some small benchmarks on an i7-2600k with an SSD:
input file: 104,126 rows with 76 columns. all numeric.
linux> time bzcat bzfile.csv.bz2 > /dev/null --> 1.8 seconds
R> d <- read.csv( pipe( bzfile ) ) --> 6.3 seconds
R> d <- read.csv( pipe( bzfile ), colClasses="numeric") --> 4.2 s
I just tested read.csv with files...it still works. it can read one line
at a time (without col.names and with nrows). nice. it loses its type
memory across reinvokcations, but this is usually not a problem if one
reads a few thousand lines inside a buffer function. this sort of function
is use
On 05/06/2013 10:32 AM, ivo welch wrote:
I just tested read.csv with files...it still works. it can read one
line at a time (without col.names and with nrows). nice. it loses
its type memory across reinvokcations, but this is usually not a
problem if one reads a few thousand lines inside a
On 13-06-05 12:08 AM, ivo welch wrote:
thx, greg.
chunk boundaries have meanings. the reader needs to stop, and buffer one
line when it has crossed to the first line beyond the boundary. it is also
problem that read.csv no longer works with files---readLines then has to do
the processing. (st
thx, greg.
chunk boundaries have meanings. the reader needs to stop, and buffer one
line when it has crossed to the first line beyond the boundary. it is also
problem that read.csv no longer works with files---readLines then has to do
the processing. (starting read.csv over and over again with
Some possibilities using existing tools.
If you create a file connection and open it before reading from it (or
writing to it), then functions like read.table and read.csv ( and
write.table for a writable connection) will read from the connection, but
not close and reset it. This means that you c
dear R wizards---
I presume this is a common problem, so I thought I would ask whether
this solution already exists and if not, suggest it. say, a user has
a data set of x GB, where x is very big---say, greater than RAM.
fortunately, data often come sequentially in groups, and there is a
need to
Yes! This does this trick. Thank You!
Tim
>>> peter dalgaard 1/26/2013 11:49 AM >>>
On Jan 26, 2013, at 16:32 , Tim Howard wrote:
> Duncan,
> Good point - I guess I am expecting too much. I'll work on a global replace
> before import or chopping with strsplit while importing.
>
> FYI every
On Jan 26, 2013, at 16:32 , Tim Howard wrote:
> Duncan,
> Good point - I guess I am expecting too much. I'll work on a global replace
> before import or chopping with strsplit while importing.
>
> FYI everyone - these folks with the non-standard csv are the US Feds:
> https://oeaaa.faa.gov/oe
Duncan,
Good point - I guess I am expecting too much. I'll work on a global replace
before import or chopping with strsplit while importing.
FYI everyone - these folks with the non-standard csv are the US Feds:
https://oeaaa.faa.gov/oeaaa/external/public/publicAction.jsp?action=showCaseDownload
.net
> Sent: Fri, 25 Jan 2013 13:42:25 -0800
> To: tghow...@gw.dec.state.ny.us
> Subject: Re: [R] read.csv quotes within fields
>
>
> On Jan 25, 2013, at 1:37 PM, Tim Howard wrote:
>
>> David,
>> Thank you again for the reply. I'll try to make readLines() and
On 13-01-25 4:37 PM, Tim Howard wrote:
David,
Thank you again for the reply. I'll try to make readLines() and strplit() work. What bugs me
is that I think it would import fine if the folks who created the csv had used double quotes
"" rather than an escaped quote \" for those pesky internal qu
On Jan 25, 2013, at 1:37 PM, Tim Howard wrote:
> David,
> Thank you again for the reply. I'll try to make readLines() and strplit()
> work. What bugs me is that I think it would import fine if the folks who
> created the csv had used double quotes "" rather than an escaped quote \" for
> thos
David,
Thank you again for the reply. I'll try to make readLines() and strplit() work.
What bugs me is that I think it would import fine if the folks who created the
csv had used double quotes "" rather than an escaped quote \" for those pesky
internal quotes. Since that's the case, I'd think
On Jan 25, 2013, at 11:35 AM, Tim Howard wrote:
> Great point, your fix (quote="") works for the example I gave. Unfortunately,
> these text strings have commas in them as well(!). Throw a few commas in any
> of the text strings and it breaks again. Sorry about not including those in
> the e
Great point, your fix (quote="") works for the example I gave. Unfortunately,
these text strings have commas in them as well(!). Throw a few commas in any
of the text strings and it breaks again. Sorry about not including those in
the example.
So, I need to incorporate commas *and* quotes wi
On Jan 25, 2013, at 10:42 AM, Tim Howard wrote:
> All,
>
> I have some csv files I am trying to import. I am finding that quotes inside
> strings are escaped in a way R doesn't expect for csv files. The problem only
> seems to rear its ugly head when there are an uneven number of internal
> q
Drat, I forgot to tell you what system I am on:
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
LC_MONETARY=English_United States.1252 LC_NUMERIC=C
All,
I have some csv files I am trying to import. I am finding that quotes inside
strings are escaped in a way R doesn't expect for csv files. The problem only
seems to rear its ugly head when there are an uneven number of internal quotes.
I'll try to recreate the problem:
# set up a matrix,
Hello,
I'm trying to read a file rows at a time, so as to not read the entire file
into memory. When reading the connections and readLines help, and R help
archive, it seems this should be possible with read.csv and a file connection,
making use of the "nrows" argument.
>From certain posts,
Hi Arvin,
How are you preparing the data to be read: a spreadsheet?
How are you reading the data?
How have you verified that the CSV file is correct?
How have you verified that the data frame is incorrect?
Can you provide a reproducible example using a small portion of your dataset?
Sarah
On T
On 04/12/2012 1:02 PM, Torus Insurance wrote:
Hi list,
I am using read.csv to read data from csf files, but noticed that the
numeric data (those larger than 10 power 9) are rounded to the nearest
million (10 power 6). Any solution?
What makes you think that is happening? R rounds values for pr
Hi list,
I am using read.csv to read data from csf files, but noticed that the
numeric data (those larger than 10 power 9) are rounded to the nearest
million (10 power 6). Any solution?
Thanks
Arvin
--
Sent from my mobile device
__
R-help@r-project.org
On 27/03/12 01:09, Benilton Carvalho wrote:
> I need to read in csv files, created by 3rd party, with fields
> containing single quotes (as shown below).
>
> "header1","header2","header3","header4"
> "field1r1","field2r1","field3r1","field4r1"
> "field1r2","field2r2","field3r2PartA), field3r2PartB
Thanks Henrique...
giving it a try now, but it'll take a good while, given the file size.
Cheers,
b
On 27 March 2012 02:35, Henrique Dallazuanna wrote:
> Benilton,
>
> Try this:
>
> read.table(textConnection(gsub('","', "','", gsub('^\"|\"$', "'",
> readLines('../teste.csv', sep = ',', quo
Benilton,
Try this:
read.table(textConnection(gsub('","', "','", gsub('^\"|\"$', "'",
readLines('../teste.csv', sep = ',', quote = "'", header = TRUE)
On Mon, Mar 26, 2012 at 8:09 PM, Benilton Carvalho
wrote:
> I need to read in csv files, created by 3rd party, with fields
> containing sing
I need to read in csv files, created by 3rd party, with fields
containing single quotes (as shown below).
"header1","header2","header3","header4"
"field1r1","field2r1","field3r1","field4r1"
"field1r2","field2r2","field3r2PartA), field3r2PartB Very" Long","field4r2"
"field1r3","field2r3","field3r3"
On Feb 27, 2012, at 14:15 , nikhil abhyankar wrote:
> Hello,
>
> I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia,
> 'AU' for Australia and 'NA' North America.
>
> However, the data frame created using read.csv shows where the string
> variable should have had the val
I believe read.csv(..., na.strings = "") will do it.
Michael
On Mon, Feb 27, 2012 at 8:15 AM, nikhil abhyankar wrote:
> Hello,
>
> I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia,
> 'AU' for Australia and 'NA' North America.
>
> However, the data frame created using re
Hello,
I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia,
'AU' for Australia and 'NA' North America.
However, the data frame created using read.csv shows where the string
variable should have had the value 'NA'.
How can I input the value 'NA' present in a column in a CS
Le samedi 31 décembre 2011 à 07:05 -0800, Dennis Fisher a écrit :
> R version: 2.13.1
> OS X
>
> Colleagues,
>
> I am working with a CSV file; for testing purposes, I created an XLS version
> of the file.
> When I read these files using read.xls (gdata) or read.csv, I encounter an
> error:
>
On Feb 7, 2012, at 12:39 AM, David Winsemius wrote:
On Feb 7, 2012, at 12:22 AM, Hasan Diwan wrote:
I'm trying to read in a CSV, with lines looking like:
HEADER, Latitude DecDeg, Latitude Hemisphere, Longitude DecDeg,
Longitude Hemisphere, Speed knots, Bearing Degrees, fixQualityGga,
n
On Feb 7, 2012, at 12:22 AM, Hasan Diwan wrote:
I'm trying to read in a CSV, with lines looking like:
HEADER, Latitude DecDeg, Latitude Hemisphere, Longitude DecDeg,
Longitude Hemisphere, Speed knots, Bearing Degrees, fixQualityGga,
noOfSatGga, altGga, heightGga, selectionGsa, fixGsa,
I'm trying to read in a CSV, with lines looking like:
HEADER, Latitude DecDeg, Latitude Hemisphere, Longitude DecDeg,
Longitude Hemisphere, Speed knots, Bearing Degrees, fixQualityGga,
noOfSatGga, altGga, heightGga, selectionGsa, fixGsa, pdopGsa,
hdopGsa, vdopGsa, noOfSatGsv, Time, *c
On Dec 31, 2011, at 16:05 , Dennis Fisher wrote:
> R version: 2.13.1
> OS X
>
> Colleagues,
>
> I am working with a CSV file; for testing purposes, I created an XLS version
> of the file.
> When I read these files using read.xls (gdata) or read.csv, I encounter an
> error:
> Error in
R version: 2.13.1
OS X
Colleagues,
I am working with a CSV file; for testing purposes, I created an XLS version of
the file.
When I read these files using read.xls (gdata) or read.csv, I encounter an
error:
Error in type.convert(data[[i]], as.is = as.is[i], dec = dec,
na.strings = ch
On 09/28/2011 09:23 AM, Mehmet Suzen wrote:
This might be obvious but I was wondering if anyone knows quick and easy
way of writing out a CSV file with varying row lengths, ideally an
initial data read from a CSV file which has the same format. See example
below.
I found it quite strange that
This might be obvious but I was wondering if anyone knows quick and easy
way of writing out a CSV file with varying row lengths, ideally an
initial data read from a CSV file which has the same format. See example
below.
I found it quite strange that R cannot write it in one go, so one must
appen
On 2011-07-19 01:27, psombe wrote:
Well yeah it works fine for small data but when i tried the exact same
command with a large data set (abt 167 rows and 4000 columns) it gave me a
different data frame.
either i get the first column as row names and so when i put data[1,1] i
get the the first r
Well yeah it works fine for small data but when i tried the exact same
command with a large data set (abt 167 rows and 4000 columns) it gave me a
different data frame.
either i get the first column as row names and so when i put data[1,1] i
get the the first row second column data (from the origin
Original-Nachricht
> Datum: Tue, 19 Jul 2011 00:05:30 -0700 (PDT)
> Von: psombe
> An: r-help@r-project.org
> Betreff: [R] read.csv help
> Hi,
> I'm a new R user and I'm having trouble with the read.csv command. It
> somehow treats the first column as
Hi,
I'm a new R user and I'm having trouble with the read.csv command. It
somehow treats the first column as a row name field even though it's not a
row name. there are no missing columns/entries and i'm not sure how to
resolve this.
the format of my data is
A, B, C, D,..(3984 columns)
12,
Dear Help List:
read.csv() seems to have changed in R version 2.13.0 as compared to version
2.12.2 when reading in simple CSV files.
In reading a 2-column CSV file ("test.csv"), say
1, a
2, b
If file is encoded as UTF-8 (on Windows 7), then under R 2.13.0
read.csv("test.csv",fileEncoding="UTF-8
Dear Duncan - many thanks for your reply/solution, it works beautifully now.
Best wishes,
Tal
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (
Hi Tal
You can add
ssl.verifypeer = FALSE
in the .opts list so that the certificate is simply accepted.
Alternatively, you can tell libcurl where to find the certification
authority file containing signatures. This can be done via the cainfo
option, e.g.
cainfo = system.file("CurlSSL", "c
Hello Duncan,
Thank you for having a look at this.
I tried the code you provided but it failed in the getForm stage. running
this:
> tt = getForm("http://spreadsheets0.google.com/spreadsheet/pub";,
+ hl ="en", key =
"0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE",
+ sing
On Fri, Apr 29, 2011 at 06:19:24PM +0300, Tal Galili wrote:
>
> data_url <- "
> http://spreadsheets0.google.com/spreadsheet/pub?hl=en&hl=en&key=0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE&single=true&gid=0&output=csv
> "
> read.csv(data_url)
> Error in file(file, "rt") : cannot open the connection
Thanks David for fixing the early issues.
The reason for the failure is that the response
from the Web server is a to redirect the requester
to another page, specifically
https://spreadsheets0.google.com/spreadsheet/pub?hl=en&hl=en&key=0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE&single=true&g
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius
> Sent: Friday, April 29, 2011 10:36 AM
> To: Tal Galili
> Cc: r-help@r-project.org
> Subject: Re: [R] read.csv fails to read a CSV
On Apr 29, 2011, at 11:19 AM, Tal Galili wrote:
Hello all,
I wish to use read.csv to read a google doc spreadsheet.
I try using the following code:
data_url <- "
http://spreadsheets0.google.com/spreadsheet/pub?hl=en&hl=en&key=0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE&single=true&gid=0&outp
Hello all,
I wish to use read.csv to read a google doc spreadsheet.
I try using the following code:
data_url <- "
http://spreadsheets0.google.com/spreadsheet/pub?hl=en&hl=en&key=0AgMhDTVek_sDdGI2YzY2R1ZESDlmZS1VYUxvblQ0REE&single=true&gid=0&output=csv
"
read.csv(data_url)
Which results in the fo
jep! I forgot to use sep="" for paste and introducted a space in front
of the filename... damn, 1 hour of my life!
Ralf
2010/6/24 Uwe Ligges :
>
>
> On 24.06.2010 19:02, Ralf B wrote:
>>
>> I try to load a file
>>
>> myData<- read.csv(file="C:\\myfolder\\mysubfolder\\mydata.csv",
>> head=TRUE, se
On 24.06.2010 19:02, Ralf B wrote:
I try to load a file
myData<- read.csv(file="C:\\myfolder\\mysubfolder\\mydata.csv",
head=TRUE, sep=";")
and get this error:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'C:\m
I try to load a file
myData <- read.csv(file="C:\\myfolder\\mysubfolder\\mydata.csv",
head=TRUE, sep=";")
and get this error:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'C:\myfolder\mysubfolder\mydata.csv: No such
p@r-project.org
> Subject: Re: [R] read.csv and blank character in object name of my
> data.frame
>
> See ?read.table and its argument "strip.white".
>
> Uwe Ligges
>
>
> On 30.04.2010 09:39, arnaud Gaboury wrote:
> > Dear group,
> >
> > Here is
Dear group,
Here is my data frame:
position100415 <-
structure(list(DESCRIPTION = structure(1:9, .Label = c(" SUGAR NO.11 Jul/10
",
" SUGAR NO.11 May/10 ", "CORN May/10 ", "COTTON NO.2 Jul/10 ",
"CRUDE OIL miNY May/10 ", "ROBUSTA COFFEE (10) Jul/10 ", "SILVER May/10 ",
"SOYBEANS Jul/10 ", "WHE
On Apr 23, 2010, at 8:00 AM, arnaud Gaboury wrote:
> Dear group,
>
>
>
> Here is my df, trades1 :
>
>
>
> trades1 <-
>
> structure(list(Instrument.Long.Name = c("CORN", "CORN", "CORN",
> "CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS",
> "SOYBEANS", "SOYBEANS", "STANDARD LE
On Fri, Apr 23, 2010 at 2:00 PM, arnaud Gaboury
wrote:
> Dear group,
> "2,421.5000", "2,448.5000", "1,380.", "1,383.", "1,383.",
>
> "1,386.", "1,386.", "1,388.", "1,389.", "1,389."
>
>
>>trades1=read.csv2("LSCTrades.csv",dec=".",sep=",",as.is=T,h=T,skip=1)
>
>
>
Dear group,
Here is my df, trades1 :
trades1 <-
structure(list(Instrument.Long.Name = c("CORN", "CORN", "CORN",
"CORN", "CORN", "SOYBEANS", "SOYBEANS", "SOYBEANS", "SOYBEANS",
"SOYBEANS", "SOYBEANS", "STANDARD LEAD USD", "STANDARD LEAD USD",
"SPCL HIGH GRADE ZINC USD", "SPCL HIGH GRA
David Winsemius 12-Dec-09 17:12:
> > txt <- gsub("( [A-Za-z]+),","\\1;",readLines("file.csv"))
> > read.csv(textConnection(txt), header=TRUE)
>var1 var2 var3
> 1 onetwo three
> 2 one this is a comment;with commas. three
Wonderful, tha
On Dec 12, 2009, at 12:01 PM, Marianne Promberger wrote:
Thanks for both replies.
Let me start by giving a better minimal example, although indeed the
regex replacement is not my problem.
system("echo \"var1,var2,var3\none,two,three\none,this is a
comment,with commas.,three\" > file.csv")
Thanks for both replies.
Let me start by giving a better minimal example, although indeed the
regex replacement is not my problem.
system("echo \"var1,var2,var3\none,two,three\none,this is a comment,with
commas.,three\" > file.csv")
> On 12/12/09 11:02, David Winsemius wrote:
> >
> > You ne
On 12/12/09 11:02, David Winsemius wrote:
>
> On Dec 12, 2009, at 7:54 AM, Marianne Promberger wrote:
>
> > Dear list,
> >
> > I have a file that is comma delimited but contains some erroneous
> > non-delimiter commas. I would like to replace these commas with
> > semicolons and then read the cor
On Dec 12, 2009, at 7:54 AM, Marianne Promberger wrote:
Dear list,
I have a file that is comma delimited but contains some erroneous
non-delimiter commas. I would like to replace these commas with
semicolons and then read the correct file into R as a data frame.
I want to do this from within
Dear list,
I have a file that is comma delimited but contains some erroneous
non-delimiter commas. I would like to replace these commas with
semicolons and then read the correct file into R as a data frame.
I want to do this from within R, without changing the original data
file.
My current idea
Alternatives to sprintf() include formatC() or
prettyNum(), which would have to be used in
combination with paste().
In Carl's solution, the file.path() function
should be considered, since it automatically uses
the correct path separators for the OS.
Furthermore, eval() is not necessary.
Oh strange, as it worked for me..
Thanks for providing alternative method in solving the problem!
On Fri, Sep 11, 2009 at 9:01 AM, Carl Witthoft wrote:
> That will not work (or at least doesn't work for me.
>
> This does work:
>
> fnam<-'thefilename.csv' #or build the name however you like
> f
That will not work (or at least doesn't work for me.
This does work:
fnam<-'thefilename.csv' #or build the name however you like
fpath <- 'macintoshhd/users/me/myfolder/ # or whatever you need
read.csv(eval(paste(fpath,fnam,sep="")) #worked for me
Carl
---
Try this:
read.csv(s
Try this:
read.csv(sprintf("D://R//Data//%04d//%04d.csv", x, x), header = TRUE)
On Wed, Sep 9, 2009 at 9:32 PM, Steven Kang wrote:
> Dear R users,
>
>
> I have numerous data sets (csv files) saved in the folder which has the
> same
> name as individual data.
> (i.e data x1 saved in x1 folder, da
Dear R users,
I have numerous data sets (csv files) saved in the folder which has the same
name as individual data.
(i.e data x1 saved in x1 folder, data x2 in x2 folder etc)
I would like to read in the desired data set name using 'scan' function and
assign this inputted value to an object so th
Thanks for your suggestions Mark,
On 04.08.2009, at 19:16, Mark Wardle wrote:
Alternatively, can't you copy the data to the Linux box using sftp
first?
This is perhaps the easiest option. I have established sftp
connection. Now I simply add all files I need to use.
So the problem is solve
I would use sshfs or an alternatively remote file system access. Ssh
to your Linux box and then mount the mac os x filesystem via sshfs, or
afs for example. Alternatively, can't you copy the data to the Linux
box using sftp first?
--
Dr. Mark Wardle
Specialist registrar, Neurology
(Sent fro
Thanks Barry and Steve,
I am trying to import data with read.csv and my file is on remote
machine.
I believe that I need to open a connection, not sure about syntax
though.
Probably works with ftp: too. How remote is it?
In fact it is a bit more complicated.
I am working on a Mac machine,
On Tue, Aug 4, 2009 at 3:37 PM, Olga Lyashevska wrote:
> Dear all,
>
> I am trying to import data with read.csv and my file is on remote machine.
> I believe that I need to open a connection, not sure about syntax though.
If it's on an HTTP server then you don't need to faff with
connections, jus
Hi,
On Aug 4, 2009, at 10:37 AM, Olga Lyashevska wrote:
Dear all,
I am trying to import data with read.csv and my file is on remote
machine.
I believe that I need to open a connection, not sure about syntax
though.
I would appreciate any suggestions,
Look at the different ways you can
Dear all,
I am trying to import data with read.csv and my file is on remote
machine.
I believe that I need to open a connection, not sure about syntax
though.
I would appreciate any suggestions,
Thanks!
Olga
__
R-help@r-project.org mailing list
here is the solution
x <- subset(read.csv("foo.csv"), VALUE>0)
On Thu, Jul 23, 2009 at 11:28 AM, stephen sefick wrote:
> I have a csv file that I am trying to read in and know that values <0
> are erroneous - is there a way to read only value grater than 0.
>
> thanks,
>
> --
> Stephen Sefick
>
>
I have a csv file that I am trying to read in and know that values <0
are erroneous - is there a way to read only value grater than 0.
thanks,
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us
On Sun, Jun 28, 2009 at 2:38 PM, Ted
Harding wrote:
> More explicitly, it could be written:
>
> skip: integer: the number of lines of the data file to skip before
> beginning to read the lines in the file.
>
> Hoping this helps!
> Ted.
It does! More questions coming once I do some mor
On 28-Jun-09 21:05:59, Mark Knecht wrote:
> Hi,
> Complete newbie to R here. Just getting started reading manuals and
> playing with data.
>
> I've managed to successfully get my *.csv files into R, however I
> have to use header=FALSE because the real header starts in line #2.
> The file format l
On Sun, Jun 28, 2009 at 2:18 PM, Peter Dalgaard wrote:
> Mark Knecht wrote:
>>
>> Hi,
>> Complete newbie to R here. Just getting started reading manuals and
>> playing with data.
>>
>> I've managed to successfully get my *.csv files into R, however I
>> have to use header=FALSE because the real
1 - 100 of 107 matches
Mail list logo