[R] rows missing after dataset loaded to R

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jul 24 02:17:22 CEST 2009


Another situation would be if you have comment characters in strings that
are intended to be content.

On Thu, Jul 23, 2009 at 5:35 PM, Greg Snow<Greg.Snow at imail.org> wrote:
> Some programs quote everything to be "safe", others only quote when needed.  The only case that I know of that read.table and friends require quotes for is when a separator is inside of a string, for example if you are using spaces as the separator and have some names with spaces in them (e.g. "North Dakota"), without the quotes that would be seen as 2 fields, with the quotes it is a single field.  If the coma (,) is the separator and you have names (e.g. "Snow, Greg") then you would need the quotes.  If you don't have any cases of the separators other than where they are separating fields, then the quotes are probably not needed.
>
> Hope this helps,
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow at imail.org
> 801.408.8111
>
>
>> -----Original Message-----
>> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
>> project.org] On Behalf Of Rnewbie
>> Sent: Thursday, July 23, 2009 11:02 AM
>> To: r-help at r-project.org
>> Subject: Re: [R] rows missing after dataset loaded to R
>>
>>
>> Thank you very much for the reply. I checked the rows and it was the
>> unbalanced " quote marks in some of the rows that caused the problem.
>> Once I
>> disabled quoting altogether, the problem is solved.
>>
>> I have one more basic question.  I disabled quoting when loading the
>> file to
>> R, and all the columns consisting of characters with or without
>> quotation
>> marks displayed normally. What does quoting actually do in R?
>>
>> --
>> View this message in context: http://www.nabble.com/rows-missing-after-
>> dataset-loaded-to-R-tp24625882p24630154.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-
>> guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>




More information about the R-help mailing list