Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread William Dunlap via R-help
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: > > >

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Charles C. Berry
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

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David Winsemius
> 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)

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David L Carlson
: 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

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread David L Carlson
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

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread William Dunlap via R-help
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.

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Ulrik Stervbo
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

Re: [R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Rui Barradas
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

[R] Data import R: some explanatory variables not showing up correctly in summary

2017-06-01 Thread Tara Adcock
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

Re: [R] Data Import to R

2014-11-14 Thread theo
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:

Re: [R] Data Import to R

2014-11-14 Thread MacQueen, Don
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

Re: [R] Data Import to R

2014-11-14 Thread Jeff Newmiller
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] Data Import to R

2014-11-13 Thread Ramesh Gautam
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

Re: [R] Data Import to R

2014-11-13 Thread David Winsemius
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

Re: [R] Data Import to R

2014-11-13 Thread PIKAL Petr
] 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

Re: [R] data import: strange experience

2013-08-22 Thread jwd
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

[R] data import: strange experience

2013-08-21 Thread SH
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

Re: [R] data import: strange experience

2013-08-21 Thread Sarah Goslee
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

Re: [R] data import: strange experience

2013-08-21 Thread David Carlson
-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

Re: [R] data import: strange experience

2013-08-21 Thread SH
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)

Re: [R] data import: strange experience

2013-08-21 Thread SH
-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

Re: [R] data import: strange experience

2013-08-21 Thread David Carlson
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

Re: [R] Data import

2011-09-27 Thread B77S
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 -

Re: [R] Data import

2011-09-26 Thread Jan van der Laan
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

Re: [R] Data import

2011-09-26 Thread Ben Bolker
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

Re: [R] Data import

2011-09-26 Thread sassorauk
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

Re: [R] Data import

2011-09-25 Thread Daniel Malter
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

[R] Data import

2011-09-25 Thread sassorauk
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:

Re: [R] Data import

2011-09-25 Thread B77S
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

Re: [R] Data import export zipped files from URLs

2010-01-24 Thread Peter Ehlers
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:

Re: [R] Data import export zipped files from URLs

2010-01-24 Thread Henrique Dallazuanna
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

Re: [R] Data import export zipped files from URLs

2010-01-23 Thread Velappan Periasamy
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

Re: [R] Data import export zipped files from URLs

2010-01-23 Thread Velappan Periasamy
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

Re: [R] Data import export zipped files from URLs

2010-01-23 Thread Henrique Dallazuanna
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()

Re: [R] Data import export zipped files from URLs

2010-01-23 Thread Velappan Periasamy
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

Re: [R] Data import export zipped files from URLs

2010-01-19 Thread Dieter Menne
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

Re: [R] Data import export zipped files from URLs

2010-01-19 Thread Duncan Temple Lang
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

Re: [R] Data import export zipped files from URLs

2010-01-19 Thread Gabor Grothendieck
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

Re: [R] Data import export zipped files from URLs

2010-01-19 Thread Velappan Periasamy
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

Re: [R] Data import export zipped files from URLs

2010-01-19 Thread Henrique Dallazuanna
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 -

[R] Data import export zipped files from URLs

2010-01-18 Thread Velappan Periasamy
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

[R] Data import from .csv-file with numeric header

2009-09-25 Thread Tobias Ruff
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

Re: [R] Data import from .csv-file with numeric header

2009-09-25 Thread Henrique Dallazuanna
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

Re: [R] Data import from .csv-file with numeric header

2009-09-25 Thread Duncan Murdoch
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

[R] data import

2008-09-11 Thread afshin fallah
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

Re: [R] data import

2008-09-11 Thread Richard . Cotton
? 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

Re: [R] data import

2008-09-11 Thread jim holtman
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

[R] Data import error: duplicate row.names

2007-12-07 Thread Fan Yang
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

Re: [R] Data import error: duplicate row.names

2007-12-07 Thread tintin_et_milou
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

Re: [R] Data import error: duplicate row.names

2007-12-07 Thread Gabor Grothendieck
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