Re: Running CSV File
Li DiJulia <[email protected]> Sun, 29 Mar 2026 20:50:54 -0400
| Newsgroups | gmane.comp.lang.r.general |
|---|---|
| Message-ID | <CAGghxKMsPr4-Aw7UHQYZ8mVJtvDaja8vHJWP_K5BrxLfJFgo6A@mail.gmail.com> |
On my computer, I saved the file as Cancer Data. csv. When I tried to put
the "Cancer Data.csv" in the working directory, under "source file," it
says the currently active source file is not saved so doesn't have a
directory to change into. I also tried to put it in the "choose directory"
and my file would not show. I am not sure what I am doing wrong.
When I tried to run the data set in R studio, I get unexpected symbol in
"g<-read.csv("cancer data.csv," header",despite writing g<-read.csv
("cancer data.csv," header=TRUE, sep=',').
When I ran a Chi Square test, it said "object not found." I don't know what
I am doing wrong
Thanks.
Attached are the files of the error message I am getting.
On Saturday, March 28, 2026, Li DiJulia <[email protected]> wrote:
> To whom it may concern,
>
> I am trying to save this file "cancer data," which I have attached in this
> email, into working directory and when I click on "to source file location"
> under set working directory" it says- The current active source is not
> saved so does not have a directory to change into. I even clicked on
> "choose directory" under set working directory, my file still won't show
> up.
>
> As for running data, When I downloaded the cancer data into R studio and
> ran g<-read. csv (" cancer_data," header=True, sep ','), I got this error
> message: *unexpected string consonant in g<-read. csv. (" cancer_data,"
> header=True, sep ',').*
>
> Note: I saved the data in my computer as "cancer data." I am not sure what
> I am doing wrong. Please advise
>
> When I tried this g<-read.csv. ("cancer_data," header=true, sep=",") I got
> this: in read.csv. ("cancer_data, header= true, sep=','):could not find
> function "read.csv". I am not sure what I am doing wrong. Please advise
>
>
> Thanks.
>
>
Cancer data csv.PNG
(image/png, 4.2 KB) - not displayed
Chi Square test.PNG
(image/png, 4.1 KB) - not displayed
CSV Read.PNG
(image/png, 34.4 KB) - not displayed
Unexpected string.PNG
(image/png, 39.1 KB) - not displayed
Working file.PNG
(image/png, 44.3 KB) - not displayed