[R] Error is coming as NULL

Sarah Goslee sarah.goslee at gmail.com
Mon Jan 23 15:03:34 CET 2012


There's no column in FD named SUBJECT
In your example data it's named SUBJCET, not the same.

It's also possible that R didn't automatically recognize the first row
as column names, and you need to add header=TRUE to the read.csv()
command.

In either case, you can see the actual column names of your data frame with:
colnames(FD)

Sarah

On Mon, Jan 23, 2012 at 8:11 AM, Sri krishna Devarayalu Balanagu
<balanagudevarayulu at gvkbio.com> wrote:
> Hi all,
>
> A small problem raising.
> Suppose the follow raw data is stored in a csv file.  And the error is coming as NULL with the following code.
> Can you please help?
> Thank you in advance.
>
> SUBJCET
>
> 9999
>
> 9999
>
> 9999
>
> 9999
>
> 9999
>
> 1Ito
>
> 1Ito
>
> 1Ito
>
> 1Ito
>
> 1Ito
>
> 1Ito
>
> 9999
>
> 9999
>
> 9999
>
> 9999
>
>
> read.csv("Noname3.csv") -> FD
> FD$SUBJECT
> NULL
>
> Regards
> Devarayalu
>

-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list