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 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
> 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)
: Thursday, June 1, 2017 11:07 AM
To: Ulrik Stervbo <ulrik.ster...@gmail.com>; Rui Barradas
<ruipbarra...@sapo.pt>; Tara Adcock <taraadco...@hotmail.com>;
r-help@r-project.org
Cc: William Dunlap via R-help <r-help@r-project.org>
Subject: Re: [R] Data import R: so
lto:r-help-boun...@r-project.org] On Behalf Of Ulrik Stervbo
Sent: Thursday, June 1, 2017 10:50 AM
To: Rui Barradas <ruipbarra...@sapo.pt>; Tara Adcock <taraadco...@hotmail.com>;
r-help@r-project.org
Subject: Re: [R] Data import R: some explanatory variables not showing up
correctly in summ
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.
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
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
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:
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 data like
numeric to numeric, integer to integer
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
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
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
] 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 data like
numeric to numeric, integer
On Wed, 21 Aug 2013 10:35:53 -0400
SH empti...@gmail.com 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
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
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
-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 your
suggestion
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)
-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:
I had some strange experience in importing data. I wonder if
anyone of you
had the same problem before
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't have 'NA' and all balanced. The number of mssing levels
were 4
I see what you mean.
Sorry and thanks for pointing that out to me Ben.
bbolker wrote:
B77S bps0002 at 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 -
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
B77S bps0002 at 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: it's
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
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 only
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:
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 file.
I
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:
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, Peter
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 www...@gmail.com wrote:
Try
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
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 veepsi...@gmail.com wrote:
cannot open: HTTP status was '404 Not Found' while running the
following commands
f - tempfile()
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
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
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
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
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
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 veepsi...@gmail.com wrote:
How to unzip this file?.
mydata -
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
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
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 lisem...@ymail.com wrote:
Hello
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
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
? 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 confidential inform
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
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
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
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
50 matches
Mail list logo