reading data problem

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

reading data problem

greg holly
Hi Dear all;

I have a dataset with 151*291 dimension. After making data read into R I am
getting a data with 96*291 dimension. Even though  I have no error message
from R I could not understand the reason why I cannot get data correctly?

Here are my codes to make read the data
a<-read.table("for_R_graphs.csv", header=T, sep=",")
a<-read.table("for_R_graphs.txt", header=T, sep="\t")

Regards,

Greg

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

Bert Gunter-2
*Perhaps* useful questions (perhaps *not*, though):

1. What is your OS? What is your R version?
2. How do you know that your data has 151 rows?
3. Are there stray characters -- perhaps a stray eof -- in your data? Have
you checked around row 96 to see what's there?
4. Are the data you did get in R what you expect?

-- Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]> wrote:

> Hi Dear all;
>
> I have a dataset with 151*291 dimension. After making data read into R I am
> getting a data with 96*291 dimension. Even though  I have no error message
> from R I could not understand the reason why I cannot get data correctly?
>
> Here are my codes to make read the data
> a<-read.table("for_R_graphs.csv", header=T, sep=",")
> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
>
> Regards,
>
> Greg
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

Bert Gunter-2
One more question:

5. Have you tried shutting down, restarting R, and rereading?

-- Bert

On Mon, Sep 24, 2018 at 11:36 AM Bert Gunter <[hidden email]> wrote:

> *Perhaps* useful questions (perhaps *not*, though):
>
> 1. What is your OS? What is your R version?
> 2. How do you know that your data has 151 rows?
> 3. Are there stray characters -- perhaps a stray eof -- in your data? Have
> you checked around row 96 to see what's there?
> 4. Are the data you did get in R what you expect?
>
> -- Bert
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]> wrote:
>
>> Hi Dear all;
>>
>> I have a dataset with 151*291 dimension. After making data read into R I
>> am
>> getting a data with 96*291 dimension. Even though  I have no error message
>> from R I could not understand the reason why I cannot get data correctly?
>>
>> Here are my codes to make read the data
>> a<-read.table("for_R_graphs.csv", header=T, sep=",")
>> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
>>
>> Regards,
>>
>> Greg
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

R help mailing list-2
Yet one more: have you tried adding quote="" to your read.table
parameters? Quote characters have a 50% chance of being balanced,
and they can encompass multiple lines...

On Mon, Sep 24, 2018 at 11:40:47AM -0700, Bert Gunter wrote:

> One more question:
>
> 5. Have you tried shutting down, restarting R, and rereading?
>
> -- Bert
>
> On Mon, Sep 24, 2018 at 11:36 AM Bert Gunter <[hidden email]> wrote:
>
> > *Perhaps* useful questions (perhaps *not*, though):
> >
> > 1. What is your OS? What is your R version?
> > 2. How do you know that your data has 151 rows?
> > 3. Are there stray characters -- perhaps a stray eof -- in your data? Have
> > you checked around row 96 to see what's there?
> > 4. Are the data you did get in R what you expect?
> >
> > -- Bert
> >
> > Bert Gunter
> >
> > "The trouble with having an open mind is that people keep coming along and
> > sticking things into it."
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >
> >
> > On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]> wrote:
> >
> >> Hi Dear all;
> >>
> >> I have a dataset with 151*291 dimension. After making data read into R I
> >> am
> >> getting a data with 96*291 dimension. Even though  I have no error message
> >> from R I could not understand the reason why I cannot get data correctly?
> >>
> >> Here are my codes to make read the data
> >> a<-read.table("for_R_graphs.csv", header=T, sep=",")
> >> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
> >>
> >> Regards,
> >>
> >> Greg
> >>
> >>         [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >> 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.
> >>
> >
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

greg holly
In reply to this post by Bert Gunter-2
Hi Bert;

Thanks for writing. Here are my answers to your questions:

Regards,

Greg

1. What is your OS? What is your R version?          *The version is 3.5.0*
2. How do you know that your data has 151 rows?  *Because I looked in excel
also I work on the same data in SAS*
3. Are there stray characters -- perhaps a stray eof -- in your data? Have
you checked around row 96 to see what's there?  *I don't think so if I have
stray characters*
4. Are the data you did get in R what you expect? * I will run for some
graphics*
5. Have you tried shutting down, restarting R, and rereading?  *Yes and
again I had the same problem*

On Mon, Sep 24, 2018 at 1:36 PM Bert Gunter <[hidden email]> wrote:

> *Perhaps* useful questions (perhaps *not*, though):
>
> 1. What is your OS? What is your R version?
> 2. How do you know that your data has 151 rows?
> 3. Are there stray characters -- perhaps a stray eof -- in your data? Have
> you checked around row 96 to see what's there?
> 4. Are the data you did get in R what you expect?
>
> -- Bert
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]> wrote:
>
>> Hi Dear all;
>>
>> I have a dataset with 151*291 dimension. After making data read into R I
>> am
>> getting a data with 96*291 dimension. Even though  I have no error message
>> from R I could not understand the reason why I cannot get data correctly?
>>
>> Here are my codes to make read the data
>> a<-read.table("for_R_graphs.csv", header=T, sep=",")
>> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
>>
>> Regards,
>>
>> Greg
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

greg holly
In reply to this post by R help mailing list-2
Hi Jan;

Thanks so much for this. Yes, I did. Her is my code to read
data: a<-read.csv("for_R_graphs.csv", header=T, sep=",")

On Mon, Sep 24, 2018 at 2:07 PM Jan T Kim via R-help <[hidden email]>
wrote:

> Yet one more: have you tried adding quote="" to your read.table
> parameters? Quote characters have a 50% chance of being balanced,
> and they can encompass multiple lines...
>
> On Mon, Sep 24, 2018 at 11:40:47AM -0700, Bert Gunter wrote:
> > One more question:
> >
> > 5. Have you tried shutting down, restarting R, and rereading?
> >
> > -- Bert
> >
> > On Mon, Sep 24, 2018 at 11:36 AM Bert Gunter <[hidden email]>
> wrote:
> >
> > > *Perhaps* useful questions (perhaps *not*, though):
> > >
> > > 1. What is your OS? What is your R version?
> > > 2. How do you know that your data has 151 rows?
> > > 3. Are there stray characters -- perhaps a stray eof -- in your data?
> Have
> > > you checked around row 96 to see what's there?
> > > 4. Are the data you did get in R what you expect?
> > >
> > > -- Bert
> > >
> > > Bert Gunter
> > >
> > > "The trouble with having an open mind is that people keep coming along
> and
> > > sticking things into it."
> > > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> > >
> > >
> > > On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]>
> wrote:
> > >
> > >> Hi Dear all;
> > >>
> > >> I have a dataset with 151*291 dimension. After making data read into
> R I
> > >> am
> > >> getting a data with 96*291 dimension. Even though  I have no error
> message
> > >> from R I could not understand the reason why I cannot get data
> correctly?
> > >>
> > >> Here are my codes to make read the data
> > >> a<-read.table("for_R_graphs.csv", header=T, sep=",")
> > >> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
> > >>
> > >> Regards,
> > >>
> > >> Greg
> > >>
> > >>         [[alternative HTML version deleted]]
> > >>
> > >> ______________________________________________
> > >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > >> 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.
> > >>
> > >
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

R help mailing list-2
hmm... I don't see the quote="" paraneter in your read.csv call


Best regards, Jan
--
Sent from my mobile. Apologies for typos and terseness

On Mon, Sep 24, 2018, 20:40 greg holly <[hidden email]> wrote:

> Hi Jan;
>
> Thanks so much for this. Yes, I did. Her is my code to read
> data: a<-read.csv("for_R_graphs.csv", header=T, sep=",")
>
> On Mon, Sep 24, 2018 at 2:07 PM Jan T Kim via R-help <[hidden email]>
> wrote:
>
>> Yet one more: have you tried adding quote="" to your read.table
>> parameters? Quote characters have a 50% chance of being balanced,
>> and they can encompass multiple lines...
>>
>> On Mon, Sep 24, 2018 at 11:40:47AM -0700, Bert Gunter wrote:
>> > One more question:
>> >
>> > 5. Have you tried shutting down, restarting R, and rereading?
>> >
>> > -- Bert
>> >
>> > On Mon, Sep 24, 2018 at 11:36 AM Bert Gunter <[hidden email]>
>> wrote:
>> >
>> > > *Perhaps* useful questions (perhaps *not*, though):
>> > >
>> > > 1. What is your OS? What is your R version?
>> > > 2. How do you know that your data has 151 rows?
>> > > 3. Are there stray characters -- perhaps a stray eof -- in your data?
>> Have
>> > > you checked around row 96 to see what's there?
>> > > 4. Are the data you did get in R what you expect?
>> > >
>> > > -- Bert
>> > >
>> > > Bert Gunter
>> > >
>> > > "The trouble with having an open mind is that people keep coming
>> along and
>> > > sticking things into it."
>> > > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>> > >
>> > >
>> > > On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]>
>> wrote:
>> > >
>> > >> Hi Dear all;
>> > >>
>> > >> I have a dataset with 151*291 dimension. After making data read into
>> R I
>> > >> am
>> > >> getting a data with 96*291 dimension. Even though  I have no error
>> message
>> > >> from R I could not understand the reason why I cannot get data
>> correctly?
>> > >>
>> > >> Here are my codes to make read the data
>> > >> a<-read.table("for_R_graphs.csv", header=T, sep=",")
>> > >> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
>> > >>
>> > >> Regards,
>> > >>
>> > >> Greg
>> > >>
>> > >>         [[alternative HTML version deleted]]
>> > >>
>> > >> ______________________________________________
>> > >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> > >> 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.
>> > >>
>> > >
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> > 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.
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: reading data problem

greg holly
Hi Jan;

Thanks so much. It is much appreciated. The problem has been solved.

Regards,

Greg

On Mon, Sep 24, 2018 at 3:05 PM Jan T Kim <[hidden email]> wrote:

> hmm... I don't see the quote="" paraneter in your read.csv call
>
>
> Best regards, Jan
> --
> Sent from my mobile. Apologies for typos and terseness
>
> On Mon, Sep 24, 2018, 20:40 greg holly <[hidden email]> wrote:
>
>> Hi Jan;
>>
>> Thanks so much for this. Yes, I did. Her is my code to read
>> data: a<-read.csv("for_R_graphs.csv", header=T, sep=",")
>>
>> On Mon, Sep 24, 2018 at 2:07 PM Jan T Kim via R-help <
>> [hidden email]> wrote:
>>
>>> Yet one more: have you tried adding quote="" to your read.table
>>> parameters? Quote characters have a 50% chance of being balanced,
>>> and they can encompass multiple lines...
>>>
>>> On Mon, Sep 24, 2018 at 11:40:47AM -0700, Bert Gunter wrote:
>>> > One more question:
>>> >
>>> > 5. Have you tried shutting down, restarting R, and rereading?
>>> >
>>> > -- Bert
>>> >
>>> > On Mon, Sep 24, 2018 at 11:36 AM Bert Gunter <[hidden email]>
>>> wrote:
>>> >
>>> > > *Perhaps* useful questions (perhaps *not*, though):
>>> > >
>>> > > 1. What is your OS? What is your R version?
>>> > > 2. How do you know that your data has 151 rows?
>>> > > 3. Are there stray characters -- perhaps a stray eof -- in your
>>> data? Have
>>> > > you checked around row 96 to see what's there?
>>> > > 4. Are the data you did get in R what you expect?
>>> > >
>>> > > -- Bert
>>> > >
>>> > > Bert Gunter
>>> > >
>>> > > "The trouble with having an open mind is that people keep coming
>>> along and
>>> > > sticking things into it."
>>> > > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>> > >
>>> > >
>>> > > On Mon, Sep 24, 2018 at 11:27 AM greg holly <[hidden email]>
>>> wrote:
>>> > >
>>> > >> Hi Dear all;
>>> > >>
>>> > >> I have a dataset with 151*291 dimension. After making data read
>>> into R I
>>> > >> am
>>> > >> getting a data with 96*291 dimension. Even though  I have no error
>>> message
>>> > >> from R I could not understand the reason why I cannot get data
>>> correctly?
>>> > >>
>>> > >> Here are my codes to make read the data
>>> > >> a<-read.table("for_R_graphs.csv", header=T, sep=",")
>>> > >> a<-read.table("for_R_graphs.txt", header=T, sep="\t")
>>> > >>
>>> > >> Regards,
>>> > >>
>>> > >> Greg
>>> > >>
>>> > >>         [[alternative HTML version deleted]]
>>> > >>
>>> > >> ______________________________________________
>>> > >> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> > >> 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.
>>> > >>
>>> > >
>>> >
>>> >       [[alternative HTML version deleted]]
>>> >
>>> > ______________________________________________
>>> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> > 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.
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>>>
>>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.