Re-importing the data with read.table's strip.white=TRUE argument may be an
easier way to deal with the problem (if the problem is leading or trailing
whitespace).
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Jun 1, 2017 at 9:17 AM, David Winsemius
wrote:
>
> > On Jun 1, 2017, at 8:57 A
On Thu, 1 Jun 2017, Rui Barradas wrote:
Hello,
In order for us to help we need to know how you've imported your data. What
was the file type? What instructions have you used to import it? Did you use
base R or a package?
Give us a minimal but complete code example that can reproduce your
sit
> On Jun 1, 2017, at 8:57 AM, William Dunlap via R-help
> wrote:
>
> Check for leading or trailing spaces in the strings in your data.
> dput(dataset) would show them.
This function would strip any leading or trailing spaces from a column:
trim <-
function (s)
{
s <- as.charac
: Thursday, June 1, 2017 11:07 AM
To: Ulrik Stervbo ; Rui Barradas
; Tara Adcock ;
r-help@r-project.org
Cc: William Dunlap via R-help
Subject: Re: [R] Data import R: some explanatory variables not showing up
correctly in summary
It looks like your printouts are based on the R summary() function
[mailto:r-help-boun...@r-project.org] On Behalf Of Ulrik Stervbo
Sent: Thursday, June 1, 2017 10:50 AM
To: Rui Barradas ; Tara Adcock ;
r-help@r-project.org
Subject: Re: [R] Data import R: some explanatory variables not showing up
correctly in summary
Hi Tara,
It seems that you categorise and
Check for leading or trailing spaces in the strings in your data.
dput(dataset) would show them.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Jun 1, 2017 at 8:49 AM, Ulrik Stervbo
wrote:
> Hi Tara,
>
> It seems that you categorise and count for each category. Could it be that
> the met
Hi Tara,
It seems that you categorise and count for each category. Could it be that
the method you use puts everything that doesn't match the predefined
categories in Other?
I'm only guessing because without a minimal reproducible example it's
difficult to do anything else.
Best wishes
Ulrik
R
Hello,
In order for us to help we need to know how you've imported your data.
What was the file type? What instructions have you used to import it?
Did you use base R or a package?
Give us a minimal but complete code example that can reproduce your
situation.
Hope this helps,
Rui Barradas
Hi,
I have a question regarding data importing into R.
When I import my data into R and review the summary, some of my explanatory
variables are being reported as if instead of being one variable, they are two
with the same name. See below for an example;
Behav person Behav dog
If your data uses a special marker such as "--" or "n/a" to indicate not
available then once you have identified those markers (using any method, though
Don's procedure below is what I use) then you can specify them with the
na.strings parameter to read.csv. (See the help for read.table for many
.@r-project.org [mailto:r-help-bounces@r-
>> project.org] On Behalf Of Ramesh Gautam
>> Sent: Friday, November 14, 2014 1:28 AM
>> To: r-help@r-project.org
>> Subject: [R] Data Import to R
>>
>> While importing .csv files into R, all data are converted to factor-by
i think you can set: options(stringsAsFactor=FALSE) which will apply
globally or use read.csv(..., stringsAsFactor=FALSE) when imporing.
have a look at the documentation ?read.csv
good luck.
On 11/14/2014 09:44 AM, David Winsemius wrote:
>
> On Nov 13, 2014, at 4:28 PM, Ramesh Gautam wrote:
>
>
t.org] On Behalf Of Ramesh Gautam
> Sent: Friday, November 14, 2014 1:28 AM
> To: r-help@r-project.org
> Subject: [R] Data Import to R
>
> While importing .csv files into R, all data are converted to factor-by
> default. But, how can I preserve the original format of the dat
On Nov 13, 2014, at 4:28 PM, Ramesh Gautam wrote:
> While importing .csv files into R, all data are converted to factor-by
> default. But, how can I preserve the original format of the data like
> numeric to numeric, integer to integer, character to character etc while
> importing from csv to R e
While importing .csv files into R, all data are converted to factor-by
default. But, how can I preserve the original format of the data like
numeric to numeric, integer to integer, character to character etc while
importing from csv to R environment.
I tried several ways, no thing helps. I used 's
On Wed, 21 Aug 2013 10:35:53 -0400
SH wrote:
It looks like your problem has already been answered, however, as a
rule of thumb anytime you see a peculiarity like this you should look
for minor variations between what you expected to export and what Excel
really exported as delimited text. Occasi
ot;"
David
From: SH [mailto:empti...@gmail.com]
Sent: Wednesday, August 21, 2013 10:14 AM
To: dcarl...@tamu.edu; peter dalgaard
Cc: r-help
Subject: Re: [R] data import: strange experience
Thanks Peter. It works with read.delim.
David: Thanks for your comments. To answer your questions. I
don
tion, TX 77840-4352
>
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of SH
> Sent: Wednesday, August 21, 2013 9:36 AM
> To: r-help@r-project.org
> Subject: [R] data import: strange experience
>
> Dear List:
&g
Hi Sarah,
Thanks for a prompt feedback. I knew it will be very vague without
example. However, I only used two commands to import data and had no
'apparent' errors. The original data have about 19000 obs and I was able
to reduce about 3200. I wonder if I can attach the data file (size:
109K) w
..@r-project.org] On Behalf Of SH
Sent: Wednesday, August 21, 2013 9:36 AM
To: r-help@r-project.org
Subject: [R] data import: strange experience
Dear List:
I had some strange experience in importing data. I wonder if
anyone of you
had the same problem before and would greatly appreciate
On Aug 21, 2013, at 16:46 , Sarah Goslee wrote:
> Hi,
>
> We don't know anything about your data or your file, so it's utterly
> impossible to offer useful suggestions.
>
> The very best thing you can do is condense your problem into a
> reproducible example, with fake data if necessary. Otherw
Hi,
We don't know anything about your data or your file, so it's utterly
impossible to offer useful suggestions.
The very best thing you can do is condense your problem into a
reproducible example, with fake data if necessary. Otherwise you're
limited by the ability of the list to guess what you'
Dear List:
I had some strange experience in importing data. I wonder if anyone of you
had the same problem before and would greatly appreciate your suggestion in
advance.
The original data set in excel format.
Here is a brief summary of the procedure I did:
1. I saved the original excel data as
I see what you mean.
Sorry and thanks for pointing that out to me Ben.
bbolker wrote:
>
> B77S auburn.edu> writes:
>
>>
>> I have never used that function, but I know that with read.csv() you can
>> do
>> the following to select only the columns you want:
>>
>> chosen_vars <- read.csv("Workb
Thanks for your responses.
Ben is right that I am looking for a way to import a subset of data from
SPSS into R. If I could do this it would mean not having to save large
datasets which takes a long time and would mean duplicating a lot of the
same information each time. I find SPSS slow to produc
B77S auburn.edu> writes:
>
> I have never used that function, but I know that with read.csv() you can do
> the following to select only the columns you want:
>
> chosen_vars <- read.csv("Workbook1.csv", header=T)[c("variable1",
> "variable3")]
>
This is not actually selectively importing:
You can with the routines in the memisc library. You can open a file
using spss.system.file and then import a subset using subset. Look in
the help pages of spss.system.file for examples.
HTH
Jan
On 09/25/2011 11:56 PM, sassorauk wrote:
Is it possible to import only certain variables from a
I have never used that function, but I know that with read.csv() you can do
the following to select only the columns you want:
chosen_vars <- read.csv("Workbook1.csv", header=T)[c("variable1",
"variable3")]
HTH
sassorauk wrote:
>
> Is it possible to import only certain variables from a SPSS fi
Is it possible to import only certain variables from a SPSS file.
I know that read.spss in the foreign library will bring the data into R but
can I choose to important only chosen variables from the SPSS dataset to R?
Thanks for your help.
R
--
View this message in context:
http://r.789695.n4.
Why would that be preferable to dropping the variables after importing the
whole dataset?
Daniel
sassorauk wrote:
>
> Is it possible to import only certain variables from a SPSS file.
>
> I know that read.spss in the foreign library will bring the data into R
> but can I choose to important on
The same error for me:
"Not Found
The requested object does not exist on this server. The link you
followed is either outdated, inaccurate, or the server has been
instructed not to let you have it. Please inform the site
administrator of the referring page."
On Sun, Jan 24, 2010 at 3:14 PM, Pete
That's not the case for me:
Not Found
The requested object does not exist on this server. The link you
followed is either outdated, inaccurate, or the server has been
instructed not to let you have it.
Firefox 3.6
-Peter Ehlers
Velappan Periasamy wrote:
http://nseindia.com/content/equitie
http://nseindia.com/content/equities/scripvol/datafiles/01-01-2010-TO-23-01-2010RCOMXN.csv
the url is correct. it is not zipped file.
copy the url in the browser window you will get the
this ..
Symbol,Series,Date, Prev Close,Open Price,High Price,Low Price,Last
Price,Close Price,Average Pr
Your url is wrong. is missing ".zip" in the end.
See the code again.
On Sat, Jan 23, 2010 at 6:37 AM, Velappan Periasamy wrote:
> cannot open: HTTP status was '404 Not Found' while running the
> following commands
>
> f <- tempfile()
> download.file("http://nseindia.com/content/equities/scripvo
The same link works and dowloads data while copying and pasteing the
link in firebox address box.
the file is there and the server is active.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gu
cannot open: HTTP status was '404 Not Found' while running the
following commands
f <- tempfile()
download.file("http://nseindia.com/content/equities/scripvol/datafiles/01-01-2010-TO-23-01-2010RCOMXN.csv";,
f)
myData <- read.csv(f)
On 1/19/10, Henrique Dallazuanna wrote:
> Try this:
>
> f <- t
Try this:
f <- tempfile()
download.file("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";,
f)
myData <- read.csv(unzip(f))
On Tue, Jan 19, 2010 at 2:56 PM, Velappan Periasamy wrote:
> How to unzip this file?.
>
>> mydata <-
>> unzip("http://nseindia.com/content
How to unzip this file?.
> mydata <-
> unzip("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
Warning message:
In
unzip("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
:
error 1 in extracting from zip file
>
If you need an example of this look at the yacasInstall function in this file:
http://ryacas.googlecode.com/svn/trunk/R/yacasInstall.R
from the Ryacas package. It downloads, unzips and installs yacas and
associated files for Windows users.
On Tue, Jan 19, 2010 at 3:10 AM, Dieter Menne
wrote:
Dieter Menne wrote:
>
> Velappan Periasamy wrote:
>> I am not able to import zipped files from the following link.
>> How to get thw same in to R?.
>> mydata <-
>> read.csv("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
>>
>
> As Brian Ripley noted in
>
>
Velappan Periasamy wrote:
>
> I am not able to import zipped files from the following link.
> How to get thw same in to R?.
> mydata <-
> read.csv("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
>
As Brian Ripley noted in
http://markmail.org/message/7dsau
I am not able to import zipped files from the following link.
How to get thw same in to R?.
mydata <-
read.csv("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
__
R-help@r-project.org mailing list
https://stat.ethz.ch
Tobias Ruff wrote:
Hello everybody out there using R,
How can I import data with a numeric header from a .csv-file?
My file example.csv has the following content (a duplicate measurement of
potentials for three different currents):
1; 2; 6
1.0; 2.1; 5.9
1.1; 2.0; 6.0
I try to import the data b
Try this:
measurement <- read.table("example.csv", sep = ";",
header = TRUE, check.names = FALSE)
plot(mean(measurement), names(measurement), xaxt = 'n')
axis(1, names(measurement))
On Fri, Sep 25, 2009 at 3:53 AM, Tobias Ruff wrote:
> Hello everybody out
Hello everybody out there using R,
How can I import data with a numeric header from a .csv-file?
My file example.csv has the following content (a duplicate measurement of
potentials for three different currents):
1; 2; 6
1.0; 2.1; 5.9
1.1; 2.0; 6.0
I try to import the data by using:
>measurement
You can use a "connection" and read a portion of the data in at a time
and process it. Do you need all the data at once? If so, I would
agree that you either need more memory (and possibly a 64-bit version
of the system), or you come up with a different approach to your
processing. You have not i
e 2 million records? Chapter 4
of the R Data Import/Export Manual may help.
2. Failing that, buy more memory for your PC.
Regards,
Richie.
Mathematical Sciences Unit
HSL
ATTENTION:
This message contains privileged and
Dear All,
I have a data set containing 2,122,164 records and 38198952 fields.
I can not import this data due to "momory problem".
Is there a way to solve this problem?
Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org ma
Read your file in without row names and check for duplicates:
DF <- read.table(myfile, skip = 1, header = FALSE)
myfile[duplicated(DF[[1]]), ] # list rows with duplicated column 1
On Dec 7, 2007 11:22 AM, Fan Yang <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to import a tab delimited file
I had the same problem one time. It was because I did a copy paste under
excel that is to say i put some data from an other file at the following of
the file, and R thought it was duplicate row.names. So i did two exports on
R and after i did a rbind... I don't know if you did a copy paste like i
Hi,
I am trying to import a tab delimited file (converted from .xls file) by
>Test<-read.table("/Users/txt", header=T, row.names=1)
The command has always worked for me, but now I have been getting the
error message saying that "duplicate 'row.names' are not allowed. I
have checked my o
51 matches
Mail list logo