Hello,
You can create a connection and read from it.
desc <- "X:/Mkt Science/Projects/ tv/202109.ext/tsa.20210901.xml.zip"
fname <- "20210901.socioDemos.a.xml"
zz <- unz(desc, fname)
Now read from zz. Example:
xml <- XML::xmlParse(zz)
Hope this helps,
Rui Barradas
Às 17:24 de 11/10/21, C
On Mon, 11 Oct 2021 16:24:01 +
"Conklin, Mike (GfK) via R-help" wrote:
> Is there a way to return a connection to a single file within a
> zipped file using gzfile or some other method.
Sure! Use unz() instead of gzfile().
--
Best regards,
Ivan
Hi have a large number of zipped files, each containing 3 xml files that I want
to read. I would like to read one of the xml files without having to
decompress each zip file first.
If I run gzfile(path2zipped file) I get
A connection with
description "X:/Mkt Science/Projects/ tv/202109.ext/t
1. Wrong list. You should post on r-sig-geo instead.
2. As you use ggplot, why aren't you using ggmap() ?
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, M
Hello!
I send the same question I asked in the stackoverflow, if you don't mind.
It is possible that it is something simple, but I really did not succeed.
I need to make a map as it is in the script I send below. The shapefile I
am using, as well as the data, are attached.
My problem: I want the d
What happens if you run "dbListTables(db) "?
That is a warning not an error.
I am a real novice with data bases so I may not be of much help but do you
know where the db file came from?
When I suggested the code above. i checked that ii worked on a sqlite file
I had, and hoped that Ivan's miracul
Hi John,
I tried it but this is what I got:
> library(RSQLite)
> filename <- "DGN-WB_0.5.db"
> sqlite.driver <- dbDriver("SQLite")
> db <- dbConnect(sqlite.driver,
+ dbname = filename)
Warning message:
Couldn't set synchronous mode: disk I/O error
Use `synchronous` = NULL to turn
Hi Ana
Stolen from https://gist.github.com/jwolfson/72bc7d7fd8d339955b38
I cannot remember if you will need to install any other packages besides
RSQLite
library(RSQLite)
filename <- "your_db_file.db"
sqlite.driver <- dbDriver("SQLite")
db <- dbConnect(sqlite.driver,
dbname = filen
Hi Ivan
Thanks for getting back to me. Can you please share with me some code I
would use to see what is in my database?
On Sat, 1 Feb 2020 at 06:19, Ivan Krylov wrote:
> On Fri, 31 Jan 2020 17:02:16 -0600
> Ana Marija wrote:
>
> > I have a database DGN-WB_0.5.db is there is a way to explore i
On Fri, 31 Jan 2020 17:02:16 -0600
Ana Marija wrote:
> I have a database DGN-WB_0.5.db is there is a way to explore its
> content in R?
My psychic debugging powers tell me that it's an SQLite database, so
the answer to your question is: yes, it should be possible to both find
out the schema and
Ms Marija,
Would you happen to know which program created it? If not, you can try the
Unix file command, if you have access to that. -- H
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
h
Too little information to tell. I googled the file name though and pages about
genetics came up... perhaps you should ask in the Bioconductor support area.
On January 31, 2020 3:02:16 PM PST, Ana Marija
wrote:
>Hello,
>
>I have a database DGN-WB_0.5.db is there is a way to explore its
>content
> On Jan 31, 2020, at 1:04 AM, Emmanuel Levy wrote:
>
> Hi,
>
> I'd like to use the Netflix challenge data and just can't figure out how to
> efficiently "scan" the files.
> https://www.kaggle.com/netflix-inc/netflix-prize-data
>
> The files have two types of row, either an *ID* e.g., "1:" ,
Hello,
I have a database DGN-WB_0.5.db is there is a way to explore its
content in R? I don't know anything about this data base.
Thanks
Ana
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-he
Hi All,
Thanks so much for your inputs, it's so nice to have such a helpful
community -- I wrote some kind of mix between the different replies, I copy
my final code below.
All the best,
Emmanuel
mat = read.csv("~/format_test.csv", fill=TRUE, header=FALSE, as.is=TRUE)
first.col.idx = grep(":",
With the *data.table* package, *R* can use *fread* as follows:
> grab<- function(file)
> {
> fin<- fread(file=file,
> sep=NULL,
> dec=".",
> quote="", nrows=Inf, header=FALSE,
> stringsAsFactors=FALSE, verbose=FALSE,
> col.names=c("record"),
> check.names=FALSE, fill=FALSE, blank.lines.skip
e ways to do
this!
Very best all,
Chris
- Original Message -
> From: "Rainer M Krug"
> To: "Emmanuel Levy"
> Cc: "R-help Mailing List"
> Sent: Friday, 31 January, 2020 10:55:46
> Subject: Re: [R] How to read a file containing two types of rows -
I did something similar yesterday…
Use readLine() to read at in and identify the “*1:*, … with a regex. Than you
have your dividers. In a second step, use read.csv(skip = …, Ncollumns = …) to
read the enclosed blocks, and last, combine them accordingly.
This is written without an R installatio
Hi,
I'd like to use the Netflix challenge data and just can't figure out how to
efficiently "scan" the files.
https://www.kaggle.com/netflix-inc/netflix-prize-data
The files have two types of row, either an *ID* e.g., "1:" , "2:", etc. or
3 values associated to each ID:
The format is as follows:
Hello,
OK, I had some spare time. Try
readCSVFile <- function(filename){
lns <- readLines(filename)
lns <- lns[sapply(lns, nchar) > 0]
lns <- gsub(" ", "", lns)
lns <- sub(";$", "", lns)
i_title <- grep("[[:alpha:]]", lns)
blocks <- lapply(seq_along(i_title)[-1], function(i){
The csv file is exported from Windows (dos format), so the line break is
different from Unix.
在 星期一, 07 十月 2019 01:18:54 -0700 撰写
> I am mad about importing this strange csv format type.
>
> The real csv has been attached now. The raw data points are huge.
>
> Many thanks.
>
Hello,
It is not clear if all files have
* a first block with just one data line
* all other blocks with as many rows as the numbers in that first data line.
If yes, maybe something like this?
lns <- readLines("strange.csv")
lns <- lns[sapply(lns, nchar) > 0]
lns <- sub(",$", "", lns)
i_title
On 06/10/2019 8:23 a.m., vod vos wrote:
The problem is aa, bb and cc all in a single csv file
contains no blank line.
So what steps do you need, and which of them do you need help with?
Duncan Murdoch
The single csv file like list output.
aa(cm)
1, 2 , 3,
bb(mm)
1, 2, 3,
4, 5, 6,
The problem is aa, bb and cc all in a single csv file
contains no blank line.
The single csv file like list output.
aa(cm)
1, 2 , 3,
bb(mm)
1, 2, 3,
4, 5, 6,
7, 8, 9,
cc(mm)
3, 4, 5,
7, 5, 9,
6, 5, 8,
在 星期日, 06 十月 2019 05:08:41 -0700 Duncan Murdoch
撰写
> On 06/10/2019 7:
On 06/10/2019 7:29 a.m., vod vos via R-help wrote:
I got hundreds of csv files. The real formats in each csv file are as follows:
aa(cm)
1, 2 , 3,
bb(mm)
1, 2, 3,
4, 5, 6,
7, 8, 9,
cc(mm)
3, 4, 5,
7, 5, 9,
6, 5, 8,
How can I use read.table or read.csv to convert the csv files
to a tidy data f
I got hundreds of csv files. The real formats in each csv file are as follows:
aa(cm)
1, 2 , 3,
bb(mm)
1, 2, 3,
4, 5, 6,
7, 8, 9,
cc(mm)
3, 4, 5,
7, 5, 9,
6, 5, 8,
How can I use read.table or read.csv to convert the csv files
to a tidy data frame format as follow:
aa, bb, cc
1, 1, 3
1, 2, 4
1
Dear all,
I am using package MCMCglmm and I would like to request for an
assistant on what
to look in the output which can tell me whether there is
significant association among the three antibody
titers(logiga,logigm,logigg) for example association between antibody
titers and exposure I ca
Dear All,
I want to save the XML representation of a model using PMML. Then I want to
read the model and predict using the model and a new dataset.
This is described in this blog post :
https://www.r-bloggers.com/predictive-modeling-using-r-and-the-openscoring-engine-a-pmml-approach/
I am able
No, you need to specify the inputs corresponding to the next value in order to
obtain a production for that point. Read ?predict.lm or whatever function is
appropriate for your model about the newdata argument.
--
Sent from my phone. Please excuse my brevity.
On October 15, 2016 8:24:35 AM PDT
On 16/10/16 04:24, mviljamaa wrote:
My conception of prediction intervals is the following:
"a prediction interval gives an interval within which we expect next y_i
to lie with a specified probability"
So when using predict() for my model:
predict(fit4, interval="prediction")[1:20,]
I get:
My conception of prediction intervals is the following:
"a prediction interval gives an interval within which we expect next y_i
to lie with a specified probability"
So when using predict() for my model:
predict(fit4, interval="prediction")[1:20,]
I get:
fit lwr upr
1 491
On Wed, 14 Sep 2016 at 00:49 Debasish Pai Mazumder
wrote:
> Hi Mike,
> Thanks again. I am using Mac OS
>
> Here is the required info
>
> > sessionInfo()
> R version 3.2.4 (2016-03-10)
> Platform: x86_64-apple-darwin13.4.0 (64-bit)
> Running under: OS X 10.11.6 (El Capitan)
>
> locale:
> [1] en_US
Hi Mike,
Thanks again. I am using Mac OS
Here is the required info
> sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.6 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
What is your computer system? What is the output of this?
sessionInfo()
If you point to a file I'll try it so I can tell you the minimum system
requirements.
Cheers, Mike
On Tue, 13 Sep 2016, 08:56 Debasish Pai Mazumder wrote:
> Thanks for your suggestion. I have checked and I don't have JPEG
Thanks for your suggestion. I have checked and I don't have JPEG2000 in
ggdalDrivers()). I am pretty new in R. I don't understand how to do I
implement JPEG2000 (JP2OpenJPEG driver) in gdalDrivers() so that I can read
grib2 files
with regards
-Deb
On Sat, Sep 10, 2016 at 2:33 AM, Michael Sumner
On Sat, 10 Sep 2016 at 07:12 Debasish Pai Mazumder
wrote:
> Hi
> I am trying to read a grib2 file in R.
>
> Here is my script
>
> library(rgdal)
> library(sp)
> library(rNOMADS)
> gribfile<-"tmax.01.2011040100.daily.grb2"
> grib <- readGDAL(gribfile)
>
> I am getting following error :
>
> dec_jpe
Hi
I am trying to read a grib2 file in R.
Here is my script
library(rgdal)
library(sp)
library(rNOMADS)
gribfile<-"tmax.01.2011040100.daily.grb2"
grib <- readGDAL(gribfile)
I am getting following error :
dec_jpeg2000: Unable to open JPEG2000 image within GRIB file.
Is the JPEG2000 driver availa
Searching for DICOM at www.rseek.org turns up a few options for
working with that image format.
But with no idea of what you want to do with them, we can't help with
the analysis. You will need to develop some clear objectives, do some
reading in how you might use R to accomplish those objectives,
Hai,
I have some DICOM format images for my project. Can you please help me
how can I read it by using R and how to analyse the images?
Regards
Vidu
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE
Thanks Peter. That certainly got me past that one, (Few more to go)
On Mon, 01-Feb-2016 at 09:30PM -0800, Peter Langfelder wrote:
|> I am not overly familar with Mint, but you need the "development
|> version" of the readline library. If you have a GUI package manager
|> installed, open it and
I am not overly familar with Mint, but you need the "development
version" of the readline library. If you have a GUI package manager
installed, open it and search for readline. You should see a version
that ends with -dev or -devel; you need to install that.
HTH,
Peter
On Mon, Feb 1, 2016 at 3:0
I've installed R from the tgz file since about R-0.9.x following the
INSTALL instructions and have always succeeded using rpm-based OSes.
With each new OS, that involved installing various additional packages
before the configure script would complete. Figuring out which
packages were required u
Your read.csv call works for me under Windows on "R version 3.2.2 Patched
(2015-08-25 r69180)" but not on "R version 3.1.3 Patched (2015-03-16
r68169)".
Suggest you upgrade your R installation and try again.
If you are on Windowsw and don't want to upgrade right now an alternative
is to issue th
Also, you should bookmark this link.
http://www.r-bloggers.com/this-r-data-import-tutorial-is-everything-you-need/
On Wednesday, July 29, 2015 at 6:41:35 AM UTC-4, jpara3 wrote:
>
> data<-read.csv("
> https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv",header=T,sep=",";)
>
How about this?
library(XML)
library(RCurl)
url <-
"https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv";
urldata <- getURL(url)
data <- readHTMLTable(urldata, stringsAsFactors = FALSE)
On Wednesday, July 29, 2015 at 6:41:35 AM UTC-4, jpara3 wrote:
>
> data<-read.csv("
data<-read.csv("https://raw.githubusercontent.com/sjkiss/Survey/master/mlogit.out.csv",header=T,sep=",";)
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-read-CSV-from-web-tp4710502p4710513.html
Sent from the R help mailing list archive at Nabble.com.
On 07/06/2015 08:10, Berend Hasselman wrote:
On 07-06-2015, at 07:50, Ye Lin wrote:
Hi All,
I downloaded a data file from dropbox and its in JSON format.
here is my code:
library(RJSONIO)
data <- fromJSON(file='C:/Users/Downloads/sample.json')
Lines <- readLines("C:/Users/Downloads/sample.j
> On 07-06-2015, at 07:50, Ye Lin wrote:
>
> Hi All,
>
> I downloaded a data file from dropbox and its in JSON format.
>
> here is my code:
> library(RJSONIO)
> data <- fromJSON(file='C:/Users/Downloads/sample.json')
> Lines <- readLines("C:/Users/Downloads/sample.json")
> df <- as.data.frame(
Hi Ye Lin,
Looks like the file was read, but there is no linefeed at the end of
the last line. You could probably stick one in using a text or hex
editor and you won't get the warning.
Jim
On Sun, Jun 7, 2015 at 3:50 PM, Ye Lin wrote:
> Hi All,
>
> I downloaded a data file from dropbox and its
Hi All,
I downloaded a data file from dropbox and its in JSON format.
here is my code:
library(RJSONIO)
data <- fromJSON(file='C:/Users/Downloads/sample.json')
Lines <- readLines("C:/Users/Downloads/sample.json")
df <- as.data.frame(t(sapply(Lines, fromJSON)))
I got this error message:
incomplet
Hi Kim
fancyRpartPlot is a front-end to prp, and you can pass it all of the
prp options - it says this in the help for fancyRpartPlot, and that's
about all it says.
So you need to spend some time reading about prp options, and how to
customize your plot to get what you want. There are lots of det
First:
summary(ss.rpart1)
or summary(ss.rpart, file="whatever")
The printout will be quite long since your tree is so large, so the second form may be
best followed by a perusal of the file with your favorite text editor. The file name of
"whatever" above should be something you choose, of
Hi all,
In the attachment or this link (http://oi58.tinypic.com/35ic9qc.jpg) you'll
find the decision tree I made. I used the Rpart package to make the tree and
the rattle package using the fancyRpartPlot to plot it. The data in the tree
looks different than about every example I have seen bef
What's wrong is that readGDAL tries to allocate all the memory
required and build an object to essentially replace the file, and your
machine cannot provide sufficient resources for that. GDAL.open
provides an open connnection to the file that can be queried in
different ways to read parts of the f
Dear expeRts,
I want to read a a.tif file into R.
When i try this:
readGDAL("a.tif"), i get the following error:
a.tif has GDAL driver GTiff
and has 7200 rows and 7200 columns
error: can't allocate 395.5 mb vector
but i can GDAL.open("a.tif") it.
SO what's wrong with readGDAL?
--
e path.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Vortex
> Sent: Wednesday, January 29, 2014 9:22 AM
> To: r-help@r-project.org
> Subject: Re: [R] how to
chke1993 wrote
> I don't know the meaning of sep="",and don't know where to add the
> location of the file such as E//...
sep="" means the data you are reading is separated by a white/blank space.
sep="," would mean it is separated by a comma (,).
If the file is located in your working direct
Try XLConnect. It seems to read the data in just fine. Did have to
create a named region, otherwise it would just read in the area that
had data.
> require(XLConnect)
> wb <- loadWorkbook("C:\\Users\\Owner\\Downloads\\Book1 (1).xlsx")
> x <- readWorksheet(wb, 1, header = FALSE) # without region
Hi,
I don't know that it is a problem in R reading the file per se. It is more of
an issue, as far as I can see, that read.xls() is not written to deal with some
aspects of cell formatting of certain types. In this case, the cell is
formatted using a financial format with Japanese Yen. I did no
Hi,
I am getting this:
read.xls("Book1.xlsx",1,header=F)
# V1
#1 -0.4195477
#2 -0.4195477
sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attac
^Hello,
Inline.
Em 24-01-2014 20:49, Christofer Bogaso escreveu:
Hi Rui,
Thanks for your reply.
However why you said, 'shouldn't read properly in R'?
I've said this because I don't know if a cell with a formula can be read
in R.
Also, because when I've opened it in excel, there was some st
Hi Rui,
Thanks for your reply.
However why you said, 'shouldn't read properly in R'?
Basically I was looking for some way so that I would get -0.419547704894512
value in R against cell F4 & F7. Because F7 is linked with F4.
Ofcourse I can open Excel file then format that cell accordingly. Howev
Hello,
Cell F7 has a formula, =F4, and when I open the file in excel, I get
-¥0.42, which shouldn't read properly in R.
The problem seems to be in the file, not in read.xls.
Hope this helps,
Rui Barradas
Em 24-01-2014 19:22, Christofer Bogaso escreveu:
Hi again,
I need to read below xlsx
Hi again,
I need to read below xlsx file correctly (available here:
http://snk.to/f-ch3exae5), and used following code (say, file is saved in
F: drive)
> library(gdata)
> read.xls("f:/Book1.xlsx", 1, header = F)
V1
1 -0.419547704894512
2 -[$Â¥-411]0.42
However please noti
See ?source
Uwe Ligges
On 14.12.2013 12:22, 水静流深 wrote:
there is a file which contain such lines:
test <-function(x,f){
n<- length(x);
sum(f*(x[1:(n-1)]+x[2:n])/2)/sum(f) -> result;
return(result);
}
i can read it into terminal , cat test.R
how can i do it in R?
readLines("
there is a file which contain such lines:
test <-function(x,f){
n<- length(x);
sum(f*(x[1:(n-1)]+x[2:n])/2)/sum(f) -> result;
return(result);
}
i can read it into terminal , cat test.R
how can i do it in R?
> readLines("c:/test.R",n=-1)
[1] "test <-function(x,f){"
I don't think you need admin rights to install R packages. Did you try it?
Best,
Ista
On Wed, Sep 11, 2013 at 9:01 AM, Charles Thuo wrote:
> how can one read data from MSEXcel into R especially in a case where one
> does not have administrator rights to install additional packages. In short
> ho
On Wed, Sep 11, 2013 at 9:06 AM, Charles Determan Jr wrote:
> If there isn't multiple sheets you can use the 'gdata' package and
> read.xls().
>
> Otherwise you could re-save the file as a csv file and load that file with
> read.csv() assuming not multiple sheets again which a csv cannot contain.
The assertion that you need administrator privileges to install packages is
false. You can install them into a directory under your Documents directory for
your own use. You only need a administrator privileges to modify the packages
located in the software installation directory.
--
If there isn't multiple sheets you can use the 'gdata' package and
read.xls().
Otherwise you could re-save the file as a csv file and load that file with
read.csv() assuming not multiple sheets again which a csv cannot contain.
Regards,
Charles
On Wed, Sep 11, 2013 at 8:01 AM, Charles Thuo wro
how can one read data from MSEXcel into R especially in a case where one
does not have administrator rights to install additional packages. In short
how to read data from MSExcel into R with base packages only.
[[alternative HTML version deleted]]
_
On 09/06/2013 11:58, Deb Midya wrote:
Hi,
Thanks in advance.
May I request you to assist me for the following please.
I am using R-3.0.1 on Windows.
Is there any R package or R function to read a .rar file (file with an
extension rar)?
Use system() with however you unpack rar files on your
Hi,
Thanks in advance.
May I request you to assist me for the following please.
I am using R-3.0.1 on Windows.
Is there any R package or R function to read a .rar file (file with an
extension rar)?
Once again, thank you very much for the time you have given.
Regards,
Deb
[[al
Hello,
Just use ?read.csv with argument header = FALSE.
wnd_data <- read.csv(text = '
"2012-08-07 00:00:00",4174830,5,8.1,34.5,9.5,32,14
"2012-08-07 00:00:01",4174831,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:02",4174832,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:03",4174833,5,8.5,34.5,9.8,30,14
"
On 2013/6/1 15:54, Jie Tang wrote:
hi R-users,
I have a file as shown below,and the first column is time information.
"2012-08-07 00:00:00",4174830,5,8.1,34.5,9.5,32,14
"2012-08-07 00:00:01",4174831,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:02",4174832,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:
hi R-users,
I have a file as shown below,and the first column is time information.
"2012-08-07 00:00:00",4174830,5,8.1,34.5,9.5,32,14
"2012-08-07 00:00:01",4174831,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:02",4174832,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:03",4174833,5,8.5,34.5,9.8,30,14
"2012
Please read the posting guide.
Your question is far from clear. First you're apparently unhappy because
character vectors are being converted to factors. Then later you ask how
to tell a function that some numeric datas should be considered factors.
Which is it that you want? A simple short exampl
I have a big data set that includes character variables of many different
values. I'm trying to use ff to read the data and then use biglm.big.matrix
to build linear models. However, since big.matrix will convert all
character vectors to factors and the character labels will be lost. I
decided to c
Behalf Of
Suzen, Mehmet
Sent: Friday, April 19, 2013 3:17 AM
To: Kaptue Tchuente, Armel
Subject: Re: [R] How to read a direct access file by connecting fortran with R ?
On 19 April 2013 07:05, Kaptue Tchuente, Armel wrote:
> Hello all,
>
> I would like to read the specific line number ro
Hello all,
I would like to read the specific line number row of a direct access file
(which is stored as a n_row*n_col matrix of elements kind=p) without reading
all the preceding lines (i.e 1,2,..,row-1).
Is there a function in R that can perform this task?
To solve my issue, I tried without
e
Kingston ON Canada
> -Original Message-
> From: e0928...@student.tuwien.ac.at
> Sent: Wed, 13 Mar 2013 00:14:58 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] How to read a *.csv file in R?
>
> Hey guys,
>
> I am dealing with this kind of data. To read the
On Mar 13, 2013, at 16:54 , Daniel Nordlund wrote:
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
>> On Behalf Of Maximus
>> Sent: Wednesday, March 13, 2013 12:15 AM
>> To: r-help@r-project.org
>> Subj
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Maximus
> Sent: Wednesday, March 13, 2013 12:15 AM
> To: r-help@r-project.org
> Subject: [R] How to read a *.csv file in R?
>
> Hey guys,
>
> I am
Hey guys,
I am dealing with this kind of data. To read the file in R I have nulled all
empty fields and tried:
dateBRENT BRENTchgHWWIHWWIchg
Jan. 86 22,5NULL68,1-15,6
Feb.86 17 NULL64,9-21,6
Mar. 86 13,7NULL66,6-19,5
Apr.86 12,3NULL
Sent: Wednesday, January 23, 2013 6:16 PM
To: Hui Du
Cc: r-help@r-project.org
Subject: Re: [R] how to read a website with Chinese Character
On 13-01-23 8:19 PM, Hui Du wrote:
> Hi all,
>
> I am planning to parse some information on a website which includes lots of
> Chinese char
On 13-01-23 8:19 PM, Hui Du wrote:
Hi all,
I am planning to parse some information on a website which includes lots of
Chinese characters. Does someone know how to read/display Chinese in R? Thanks.
url = "http://www.teec.org.cn/html/renwujieshao/";
x = readLines(url)
If you look at the fir
Hi all,
I am planning to parse some information on a website which includes lots of
Chinese characters. Does someone know how to read/display Chinese in R? Thanks.
url = "http://www.teec.org.cn/html/renwujieshao/";
x = readLines(url)
I tried encoding = 'UTF-8' already but it didn't help.
My R
NA
A.K.
- Original Message -
From: Yao He
To: R help
Cc:
Sent: Wednesday, January 23, 2013 7:42 AM
Subject: [R] how to read a df like that and transform it?
Dear all
I have a data.frame like that :
father mother num_daughter daughter
291 3906 0 NULL
2
NA NA NA
A.K.
- Original Message -----
From: Yao He
To: R help
Cc:
Sent: Wednesday, January 23, 2013 7:42 AM
Subject: [R] how to read a df like that and transform it?
Dear all
I have a data.frame like that :
father mother num_daughter daughter
291 390
","mother"),timevar="num_daughter",direction="wide")
A.K.
- Original Message -
From: Yao He
To: R help
Cc:
Sent: Wednesday, January 23, 2013 7:42 AM
Subject: [R] how to read a df like that and transform it?
Dear all
I have a data.frame like that :
f
I don't really understand this data table, but maybe this modification
will give you the idea:
dat <- read.table(text="father mother num_daughterdaughter
291 39060 NA
275 42190 NA
273 42361 49410
281 41631 49408
274 42261
Dear all
I have a data.frame like that :
father mother num_daughterdaughter
291 39060 NULL
275 42190 NULL
273 42361 49410
281 41631 49408
274 42261 49406
295 38692 49403
49404
Here is one way to read the data. Modified your sample for the line
counts of actual data:
x <- readLines(textConnection("40 Terry Cove-Model
300 .300110459327698
300.041656494141 .289277672767639
300.083343505859 .276237487792969
300.125 .258902788162231
300.166656494141 .236579895019531
300.20
You have to sync up the data before you can do a scatter plot. If the data are
changing slowly relative to the sample rates then you can use approx to
interpolate one data set at the timestamps of the second to generate a column
you can add to the second data frame.
-
I was able to read the data using the following code:
jd1 <- read.table('Practicedata.dat',header=T,sep="\t",nrow=6240)
jd2 <- read.table('Practicedata.dat',header=T,sep="\t",skip=6241)
colnames(jd1) <- c("Date","Mod")
colnames(jd2) <- c("Date", "Obs")
p <- ggplot(jd1,aes(x=Date,y=Mod))+geom_line(
Hello All,
I have a data file in a text format and there are two data sets. The data
set are continuous.
For each data set there is a header which has the number of data rows and
the name of data series.
For example first data set has "6240 Terry Cove-Model". Then the data for
that series follows
Man, if that medicine doesn't cure you of wanting to create dozens of different
objects in memory, I don't know what will. Let's see:
1) Creates a potentially large number of global objects with names unrelated to
their content
2) Creates and updates a global variable for future race condition d
You can try this one too.
#Set the directory to a path where all the files to be read are stored
TabletoRead=list.files(pattern=".txt")
I_Step=unlist(lapply(TabletoRead,function(tab){
srno<<-ifelse(exists("srno"),(1+srno),1)
Temp=read.table(tab,header=T,s
The short answer is: don't try. You really don't want dozens of different
objects in memory that you didn't name yourself.
What you want instead is a list of objects. You can start with a vector of
filenames and use lapply to create another list containing the data frames. For
convenience you c
Dear Yao,
You can use a list() as follows (untested):
setwd("~/path/to/your/files")
f <- list.files(pattern = ".txt") # list the files
info <- lapply(f, read.table, header = TRUE)
names(info) <- f
info
To see the information in the first data set just do
info[[1]]
See ?list.files and ?lapply
1 - 100 of 389 matches
Mail list logo