Request for R Assistance: Downloading Data

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

Request for R Assistance: Downloading Data

Spencer Brackett
 Good evening,

  I am attempting to download Genomic data from the GDC onto R for analysis
and am experiencing some difficulty. I have downloaded the GDC data into an
Excel, CSV, and notepad (.txt) file and implemented what I believe to be
the proper arguments, with every attempting failing to properly load the
data onto R. The following is the various attempts I made in trying to take
one of these files (a translated version of the GDC data) and load it into R
.

> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘LGG Drug (CSV).csv’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
(CSV).csv",header=TRUE,sep=",")
Error: unexpected symbol in "LGG Drug"
> LGG Drug<-read.table("C:
Error: unexpected symbol in "LGG Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘DRUG TRIAL GBM.txt’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in " GBM Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
:
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘DRUG TRIAL GBM(word wrap).txt’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
wrap).txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"

Any insight into what perhaps I am inputting that is causes this
reoccurring error? Any suggestions as to another procedure for moving
forward would be greatly appreciated!

Many thanks,

Spencer Brackett

        [[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: Request for R Assistance: Downloading Data

Sparks, John James
Just a hunch, but I would recommend simplifying your filename:  remove the (CSV) portion.  It could be confusing in R read syntax.  Create a filename with no unnecessary punctuation and no blank spaces.


--John Sparks


________________________________
From: R-help <[hidden email]> on behalf of Spencer Brackett <[hidden email]>
Sent: Sunday, August 19, 2018 2:11 PM
To: [hidden email]
Subject: [R] Request for R Assistance: Downloading Data

Good evening,

  I am attempting to download Genomic data from the GDC onto R for analysis
and am experiencing some difficulty. I have downloaded the GDC data into an
Excel, CSV, and notepad (.txt) file and implemented what I believe to be
the proper arguments, with every attempting failing to properly load the
data onto R. The following is the various attempts I made in trying to take
one of these files (a translated version of the GDC data) and load it into R
.

> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file �LGG Drug (CSV).csv� has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
(CSV).csv",header=TRUE,sep=",")
Error: unexpected symbol in "LGG Drug"
> LGG Drug<-read.table("C:
Error: unexpected symbol in "LGG Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file �DRUG TRIAL GBM.txt� has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in " GBM Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
:
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file �DRUG TRIAL GBM(word wrap).txt� has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
wrap).txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"

Any insight into what perhaps I am inputting that is causes this
reoccurring error? Any suggestions as to another procedure for moving
forward would be greatly appreciated!

Many thanks,

Spencer Brackett

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
R-help -- Main R Mailing List: Primary help - Homepage - SfS<https://stat.ethz.ch/mailman/listinfo/r-help>
stat.ethz.ch
The main R mailing list, for announcements about the development of R and the availability of new code, questions and answers about problems and solutions using R, enhancements and patches to the source code and documentation of R, comparison and compatibility with S and S-plus, and for the posting of nice examples and benchmarks.



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: Request for R Assistance: Downloading Data

Rich Shepard
In reply to this post by Spencer Brackett
On Sun, 19 Aug 2018, Spencer Brackett wrote:

> I am attempting to download Genomic data from the GDC onto R for analysis
> and am experiencing some difficulty. I have downloaded the GDC data into an
> Excel, CSV, and notepad (.txt) file and implemented what I believe to be
> the proper arguments, with every attempting failing to properly load the
> data onto R.

Spencer,

   Looks like you want to read the data into an R dataframe; I assume that's
the format for geonomic data as it is for environmental data.

>> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")

   Instead, try

mydata <- read.csv("lgg_drug.csv", header = TRUE, stringsAsFactors = FALSE)

Note: this assumes the data file has column headers. And, you can use your
.txt file with the read.table() function.

> Any insight into what perhaps I am inputting that is causes this
> reoccurring error? Any suggestions as to another procedure for moving
> forward would be greatly appreciated!

   How much about R have you read/learned? Taking a couple of steps back
might be well worth your while.

Regards,

Rich

______________________________________________
[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: Request for R Assistance: Downloading Data

David Carlson
In reply to this post by Spencer Brackett
The load() function is only used for binary files that R creates with the save() function.

You are trying to assign the data to an object (variable) called LGG Drug. R does not allow spaces in variable names. You could try LGGDrug, LGG_Drug, or LGG.Drug. Same issue with GBM Drug.

David L. Carlson
Department of Anthropology
Texas A&M University

-----Original Message-----
From: R-help [mailto:[hidden email]] On Behalf Of Spencer Brackett
Sent: Sunday, August 19, 2018 2:12 PM
To: [hidden email]
Subject: [R] Request for R Assistance: Downloading Data

 Good evening,

  I am attempting to download Genomic data from the GDC onto R for analysis
and am experiencing some difficulty. I have downloaded the GDC data into an
Excel, CSV, and notepad (.txt) file and implemented what I believe to be
the proper arguments, with every attempting failing to properly load the
data onto R. The following is the various attempts I made in trying to take
one of these files (a translated version of the GDC data) and load it into R
.

> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘LGG Drug (CSV).csv’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
(CSV).csv",header=TRUE,sep=",")
Error: unexpected symbol in "LGG Drug"
> LGG Drug<-read.table("C:
Error: unexpected symbol in "LGG Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘DRUG TRIAL GBM.txt’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in "GBM Drug"
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"
>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
GBM.txt",header=TRUE,sep="\t")
Error: unexpected symbol in " GBM Drug"
> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
:
  bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘DRUG TRIAL GBM(word wrap).txt’ has magic number 'MANIF'
  Use of save versions prior to 2 is deprecated
> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
wrap).txt",header=TRUE,sep="")
Error: unexpected symbol in "GBM Drug"

Any insight into what perhaps I am inputting that is causes this
reoccurring error? Any suggestions as to another procedure for moving
forward would be greatly appreciated!

Many thanks,

Spencer Brackett

        [[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: Request for R Assistance: Downloading Data

Jeff Newmiller
In reply to this post by Sparks, John James
I think this hunch is off the mark... the file name is fine as it is... if anything will confuse R it would be that the data inside the file are not what was expected.

If in fact the file is csv formatted then the function to read it would be read.csv [1] or read.table [2]. Read the help pages for these functions and read the R Data Import/Export documentation [3].

[1] ?read.csv at R console
[2] ?read.table many of the options for this function will work for read.csv.
[3] https://cran.r-project.org/doc/manuals/r-release/R-data.html

On August 19, 2018 12:16:14 PM PDT, "Sparks, John" <[hidden email]> wrote:

>Just a hunch, but I would recommend simplifying your filename:  remove
>the (CSV) portion.  It could be confusing in R read syntax.  Create a
>filename with no unnecessary punctuation and no blank spaces.
>
>
>--John Sparks
>
>
>________________________________
>From: R-help <[hidden email]> on behalf of Spencer
>Brackett <[hidden email]>
>Sent: Sunday, August 19, 2018 2:11 PM
>To: [hidden email]
>Subject: [R] Request for R Assistance: Downloading Data
>
>Good evening,
>
>I am attempting to download Genomic data from the GDC onto R for
>analysis
>and am experiencing some difficulty. I have downloaded the GDC data
>into an
>Excel, CSV, and notepad (.txt) file and implemented what I believe to
>be
>the proper arguments, with every attempting failing to properly load
>the
>data onto R. The following is the various attempts I made in trying to
>take
>one of these files (a translated version of the GDC data) and load it
>into R
>.
>
>> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
>Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �LGG Drug (CSV).csv� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
>(CSV).csv",header=TRUE,sep=",")
>Error: unexpected symbol in "LGG Drug"
>> LGG Drug<-read.table("C:
>Error: unexpected symbol in "LGG Drug"
>> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
>Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �DRUG TRIAL GBM.txt� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="\t")
>Error: unexpected symbol in "GBM Drug"
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="\t")
>Error: unexpected symbol in " GBM Drug"
>> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
>Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
>wrap).txt")
>:
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �DRUG TRIAL GBM(word wrap).txt� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM(word
>wrap).txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>
>Any insight into what perhaps I am inputting that is causes this
>reoccurring error? Any suggestions as to another procedure for moving
>forward would be greatly appreciated!
>
>Many thanks,
>
>Spencer Brackett
>
>        [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>R-help -- Main R Mailing List: Primary help - Homepage -
>SfS<https://stat.ethz.ch/mailman/listinfo/r-help>
>stat.ethz.ch
>The main R mailing list, for announcements about the development of R
>and the availability of new code, questions and answers about problems
>and solutions using R, enhancements and patches to the source code and
>documentation of R, comparison and compatibility with S and S-plus, and
>for the posting of nice examples and benchmarks.
>
>
>
>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]]

--
Sent from my phone. Please excuse my brevity.

______________________________________________
[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: Request for R Assistance: Downloading Data

Sparks, John James
I agree with Jeff.  The data type is the problem.  I wrote what I wrote without looking at the problem very carefully.


--JJS


________________________________
From: Jeff Newmiller <[hidden email]>
Sent: Sunday, August 19, 2018 4:38 PM
To: [hidden email]; Sparks, John; Spencer Brackett; [hidden email]
Subject: Re: [R] Request for R Assistance: Downloading Data

I think this hunch is off the mark... the file name is fine as it is... if anything will confuse R it would be that the data inside the file are not what was expected.

If in fact the file is csv formatted then the function to read it would be read.csv [1] or read.table [2]. Read the help pages for these functions and read the R Data Import/Export documentation [3].

[1] ?read.csv at R console
[2] ?read.table many of the options for this function will work for read.csv.
[3] https://cran.r-project.org/doc/manuals/r-release/R-data.html
R Data Import/Export<https://cran.r-project.org/doc/manuals/r-release/R-data.html>
cran.r-project.org
1.1 Imports. The easiest form of data to import into R is a simple text file, and this will often be acceptable for problems of small or medium scale.




On August 19, 2018 12:16:14 PM PDT, "Sparks, John" <[hidden email]> wrote:

>Just a hunch, but I would recommend simplifying your filename:  remove
>the (CSV) portion.  It could be confusing in R read syntax.  Create a
>filename with no unnecessary punctuation and no blank spaces.
>
>
>--John Sparks
>
>
>________________________________
>From: R-help <[hidden email]> on behalf of Spencer
>Brackett <[hidden email]>
>Sent: Sunday, August 19, 2018 2:11 PM
>To: [hidden email]
>Subject: [R] Request for R Assistance: Downloading Data
>
>Good evening,
>
>I am attempting to download Genomic data from the GDC onto R for
>analysis
>and am experiencing some difficulty. I have downloaded the GDC data
>into an
>Excel, CSV, and notepad (.txt) file and implemented what I believe to
>be
>the proper arguments, with every attempting failing to properly load
>the
>data onto R. The following is the various attempts I made in trying to
>take
>one of these files (a translated version of the GDC data) and load it
>into R
>.
>
>> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
>Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �LGG Drug (CSV).csv� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
>(CSV).csv",header=TRUE,sep=",")
>Error: unexpected symbol in "LGG Drug"
>> LGG Drug<-read.table("C:
>Error: unexpected symbol in "LGG Drug"
>> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
>Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �DRUG TRIAL GBM.txt� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="\t")
>Error: unexpected symbol in "GBM Drug"
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM.txt",header=TRUE,sep="\t")
>Error: unexpected symbol in " GBM Drug"
>> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
>Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
>wrap).txt")
>:
>bad restore file magic number (file may be corrupted) -- no data loaded
>In addition: Warning message:
>file �DRUG TRIAL GBM(word wrap).txt� has magic number 'MANIF'
>  Use of save versions prior to 2 is deprecated
>> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
>GBM(word
>wrap).txt",header=TRUE,sep="")
>Error: unexpected symbol in "GBM Drug"
>
>Any insight into what perhaps I am inputting that is causes this
>reoccurring error? Any suggestions as to another procedure for moving
>forward would be greatly appreciated!
>
>Many thanks,
>
>Spencer Brackett
>
>        [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>R-help -- Main R Mailing List: Primary help - Homepage -
>SfS<https://stat.ethz.ch/mailman/listinfo/r-help>
>stat.ethz.ch
>The main R mailing list, for announcements about the development of R
>and the availability of new code, questions and answers about problems
>and solutions using R, enhancements and patches to the source code and
>documentation of R, comparison and compatibility with S and S-plus, and
>for the posting of nice examples and benchmarks.
>
>
>
>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]]

--
Sent from my phone. Please excuse my brevity.

        [[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: Request for R Assistance: Downloading Data

Spencer Brackett
 Please ignore my last post/inquiry... I have solved the problem. Thanks
again for the help!

On Sun, Aug 19, 2018 at 5:43 PM Sparks, John <[hidden email]> wrote:

> I agree with Jeff.  The data type is the problem.  I wrote what I wrote
> without looking at the problem very carefully.
>
>
> --JJS
>
>
> ------------------------------
> *From:* Jeff Newmiller <[hidden email]>
> *Sent:* Sunday, August 19, 2018 4:38 PM
> *To:* [hidden email]; Sparks, John; Spencer Brackett;
> [hidden email]
> *Subject:* Re: [R] Request for R Assistance: Downloading Data
>
> I think this hunch is off the mark... the file name is fine as it is... if
> anything will confuse R it would be that the data inside the file are not
> what was expected.
>
> If in fact the file is csv formatted then the function to read it would be
> read.csv [1] or read.table [2]. Read the help pages for these functions and
> read the R Data Import/Export documentation [3].
>
> [1] ?read.csv at R console
> [2] ?read.table many of the options for this function will work for
> read.csv.
> [3] https://cran.r-project.org/doc/manuals/r-release/R-data.html
> R Data Import/Export
> <https://cran.r-project.org/doc/manuals/r-release/R-data.html>
> cran.r-project.org
> 1.1 Imports. The easiest form of data to import into R is a simple text
> file, and this will often be acceptable for problems of small or medium
> scale.
>
>
>
> On August 19, 2018 12:16:14 PM PDT, "Sparks, John" <[hidden email]>
> wrote:
> >Just a hunch, but I would recommend simplifying your filename:  remove
> >the (CSV) portion.  It could be confusing in R read syntax.  Create a
> >filename with no unnecessary punctuation and no blank spaces.
> >
> >
> >--John Sparks
> >
> >
> >________________________________
> >From: R-help <[hidden email]> on behalf of Spencer
> >Brackett <[hidden email]>
> >Sent: Sunday, August 19, 2018 2:11 PM
> >To: [hidden email]
> >Subject: [R] Request for R Assistance: Downloading Data
> >
> >Good evening,
> >
> >I am attempting to download Genomic data from the GDC onto R for
> >analysis
> >and am experiencing some difficulty. I have downloaded the GDC data
> >into an
> >Excel, CSV, and notepad (.txt) file and implemented what I believe to
> >be
> >the proper arguments, with every attempting failing to properly load
> >the
> >data onto R. The following is the various attempts I made in trying to
> >take
> >one of these files (a translated version of the GDC data) and load it
> >into R
> >.
> >
> >> load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv")
> >Error in load("C:\\Users\\Spencer\\Desktop\\LGG Drug (CSV).csv") :
> >bad restore file magic number (file may be corrupted) -- no data loaded
> >In addition: Warning message:
> >file �LGG Drug (CSV).csv� has magic number 'MANIF'
> >  Use of save versions prior to 2 is deprecated
> >> LGG Drug<-read.table("C:\\Users\\Spencer\\Desktop\\LGG Drug
> >(CSV).csv",header=TRUE,sep=",")
> >Error: unexpected symbol in "LGG Drug"
> >> LGG Drug<-read.table("C:
> >Error: unexpected symbol in "LGG Drug"
> >> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt")
> >Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM.txt") :
> >bad restore file magic number (file may be corrupted) -- no data loaded
> >In addition: Warning message:
> >file �DRUG TRIAL GBM.txt� has magic number 'MANIF'
> >  Use of save versions prior to 2 is deprecated
> >> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
> >GBM.txt",header=TRUE,sep="")
> >Error: unexpected symbol in "GBM Drug"
> >> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
> >GBM.txt",header=TRUE,sep="\t")
> >Error: unexpected symbol in "GBM Drug"
> >> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
> >GBM.txt",header=TRUE,sep="")
> >Error: unexpected symbol in "GBM Drug"
> >>  GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
> >GBM.txt",header=TRUE,sep="\t")
> >Error: unexpected symbol in " GBM Drug"
> >> load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word wrap).txt")
> >Error in load("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL GBM(word
> >wrap).txt")
> >:
> >bad restore file magic number (file may be corrupted) -- no data loaded
> >In addition: Warning message:
> >file �DRUG TRIAL GBM(word wrap).txt� has magic number 'MANIF'
> >  Use of save versions prior to 2 is deprecated
> >> GBM Drug<-read.table("C:\\Users\\Spencer\\Desktop\\DRUG TRIAL
> >GBM(word
> >wrap).txt",header=TRUE,sep="")
> >Error: unexpected symbol in "GBM Drug"
> >
> >Any insight into what perhaps I am inputting that is causes this
> >reoccurring error? Any suggestions as to another procedure for moving
> >forward would be greatly appreciated!
> >
> >Many thanks,
> >
> >Spencer Brackett
> >
> >        [[alternative HTML version deleted]]
> >
> >______________________________________________
> >[hidden email] mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >R-help -- Main R Mailing List: Primary help - Homepage -
> >SfS<https://stat.ethz.ch/mailman/listinfo/r-help>
> >stat.ethz.ch
> >The main R mailing list, for announcements about the development of R
> >and the availability of new code, questions and answers about problems
> >and solutions using R, enhancements and patches to the source code and
> >documentation of R, comparison and compatibility with S and S-plus, and
> >for the posting of nice examples and benchmarks.
> >
> >
> >
> >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]]
>
> --
> Sent from my phone. Please excuse my brevity.
>

        [[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.