Re: [R] Pipe precedence
I didn’t know R had a new pipe operator, but I have seen “|>” (without quotes) used in the Elixir language though. Are there now two? “%>%” from the magrittr package and “|>” which is built-in? > On May 22, 2021, at 5:26 PM, Jeff Newmiller wrote: > > What is the precedence of the new |> pipe operator? I don't see it mentioned > in ?Syntax, nor does it come up when I search the R Language Definition > document. > -- > Sent from my phone. Please excuse my brevity. > > __ > R-help@r-project.org 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. __ R-help@r-project.org 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.
Re: [R] library(hms)
Your opening quote looks slightly different from the closing quote. This probably explains why you received the error message regarding “unexpected input”. I hope this helps. > On Mar 17, 2021, at 10:08 AM, Gregory Coats via R-help > wrote: > > On my MacBook, I do not have, and do not know how to install, library(hms). > Greg Coats > >> library(hms) > Error in library(hms) : there is no package called ‘hms’ >> Install.libraries(“hms”) > Error: unexpected input in "Install.libraries(“" >> >[[alternative HTML version deleted]] > > __ > R-help@r-project.org 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. __ R-help@r-project.org 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.
Re: [R] library(hms)
Maybe you used the wrong quotes with the parentheses? > On Mar 17, 2021, at 10:08 AM, Gregory Coats via R-help > wrote: > > On my MacBook, I do not have, and do not know how to install, library(hms). > Greg Coats > >> library(hms) > Error in library(hms) : there is no package called ‘hms’ >> Install.libraries(“hms”) > Error: unexpected input in "Install.libraries(“" >> >[[alternative HTML version deleted]] > > __ > R-help@r-project.org 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]] __ R-help@r-project.org 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.
Re: [R] package not available for R version...
Hi. Can you upgrade your version of R? That might help. ~Caitlin > On Jan 12, 2021, at 1:08 PM, Duncan Murdoch wrote: > > On 12/01/2021 2:43 p.m., varin sacha via R-help wrote: >> Dear R-experts, >> I have tried to reach the maintainer of the rgam package. Until now, no >> response. >> Since I'm in a bit of a hurry, I try to reach you because as I try to >> install the rgam package using the command : >> install.packages("rgam") >> I get this warning message : >> Warning message: >> package ‘rgam’ is not available (for R version 3.6.3) >> The strange thing is that rgam depends R (>= 3.0.2) , stats >> How can I solve this problem ? > > That package is no longer listed on CRAN. You can find some versions of it > in https://cran.r-project.org/src/contrib/Archive, the most recent being from > 2018. I'd guess it doesn't pass all checks, so it was removed. > > You could download the last version, and see if you can get it to work. If > you are really ambitious, you might be able to take it over as maintainer. > > Or it might be easier to find a different package to do what you want to do. > > Duncan Murdoch > > __ > R-help@r-project.org 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. __ R-help@r-project.org 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.
Re: [R] Packages Not Available for R version 4.0.3
Hi Charles. https://cran.r-project.org/web/packages/rgrs/index.html https://cran.r-project.org/bin/windows/Rtools/ What operating system are you using? Hope this helps. ~Caitlin On Fri, Oct 23, 2020 at 11:41 PM Charles Thuo wrote: > I have attempted to install the packages Rtools and rgrs but the > install.packages command yields a message that the same are not available > for R version 4.0. > > How do i get around this as i need the said packages to implement some > credit scoring GLMs using the " rgrs" package. > > With Regards, > > Charles > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org 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]] __ R-help@r-project.org 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.
Re: [R] Help installing netReg
Hi Spencer. On a Windows machine, the message “Installation path not writeable” can be solved by starting RStudio as an administrator. Right click the RStudio icon and select “Run as Administrator”. This should solve that problem. Hope this helps. ~Caitlin Sent from my iPhone > On Apr 21, 2019, at 9:22 PM, Jeff Newmiller wrote: > > I don't know anything about the Bioconductor installation, but it is normal > practice on Windows to install updates to packages distributed with R (such > as those below) by "superceding" them in your user library. This happens > automatically if you don't specify the destination library to install to. > Just do a normal update.packages and the Program Files library will stay > unchanged but your user library versions of the base R packages will be > loaded instead. > >> On April 21, 2019 8:49:08 PM PDT, Spencer Brackett >> wrote: >> Boris, >> ' >> My apologies. Thanks for the tip! I tried the command you suggested in >> your >> response and got the following... >> >>> BiocManager::install("netReg") >> Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.1 (2018-07-02) >> Installing package(s) 'BiocVersion', 'netReg' >> trying URL ' >> https://bioconductor.org/packages/3.8/bioc/bin/windows/contrib/3.5/BiocVersion_3.8.0.zip >> ' >> Content type 'application/zip' length 8843 bytes >> downloaded 8843 bytes >> >> trying URL ' >> https://bioconductor.org/packages/3.8/bioc/bin/windows/contrib/3.5/netReg_1.6.0.zip >> ' >> Content type 'application/zip' length 4143315 bytes (4.0 MB) >> downloaded 4.0 MB >> >> package ‘BiocVersion’ successfully unpacked and MD5 sums checked >> package ‘netReg’ successfully unpacked and MD5 sums checked >> >> The downloaded binary packages are in >> C:\Users\Spencer\AppData\Local\Temp\RtmpW6FwPY\downloaded_packages >> installation path not writeable, unable to update packages: class, >> cluster, >> codetools, foreign, >> lattice, MASS, Matrix, mgcv, nlme, rpart, survival >> >> ***Does it matter that the packages above are unable to be updated? For >> insight, I am trying to generate linear regression models that model >> expression of methylation w/ in a TCGA dataset.*** >> >> Best, >> >> Spencer >> >> On Sun, Apr 21, 2019 at 10:57 PM Boris Steipe >> >> wrote: >> >>> This is unrelated to the question on the subject line, we call this >>> "thread hijacking" and that's one of the Things Not To Do. Post a new >>> question. >>> >>> I just wanted to give you the proper incantation for Bioconductor >>> packages. As you already know, don't use bioclite(), which needed to >> be >>> sourced from an URL. Instead install.packages("Biocmanager") from >> CRAN, >>> then - there's no need to load it - use Biocmanager::install(>> name>) from there on. I usually have it in scripts like so: >>> >>> if (! requireNamespace("BiocManager", quietly = TRUE)) { >>> install.packages("BiocManager") >>> } >>> if (! requireNamespace("biomaRt", quietly = TRUE)) { >>> BiocManager::install("biomaRt") >>> } >>> >>> >>> Cheers, >>> Boris >>> >>>> On 2019-04-21, at 22:27, Spencer Brackett < >>> spbracket...@saintjosephhs.com> wrote: >>>> >>>> R users, >>>> >>>> I am trying to download R Studio onto my Chrombook for >> convenience, but >>>> exited out of the Linux terminal that had opened upon my turning on >> of >>>> Linux(Beta) through my settings. Because of this I am unable to >> prompt >>> the >>>> same type of Linex terminal and can only enable a new one via ctrl >> alt t >>> . >>>> Running the same line of commands (as shown below) that I was >> following >>>> before encountering my error w/ the first terminal is not working. >> Note, >>>> the hostname for the new terminal that I have prompted is crosh> if >> that >>>> effects anything. >>>> >>>> Commands I was instructed to make after enabling Linux on my >> Chrome... >>>> >>>> lsb_release >>>> sudo apt search r-base | grep ^r-base (to download R) >>>> >>>> -y gnupg2 >>>> —keyserver keys.gnupg.net —recv-key ‘ ‘ >>>> ***where my terminal experienced some sort of error causing me
Re: [R] you are making it far too difficult
I would :) Sent from my iPhone > On Dec 27, 2018, at 2:34 PM, Spencer Brackett > wrote: > > So I should use “\t” proceeding on? > >> On Thu, Dec 27, 2018 at 4:30 PM Caitlin Gibbons >> wrote: >> “\t” is an escape sequence which signifies one tab character. “/t” is NOT an >> escape sequence, and to R, looks like a very brief file path. >> >> Sent from my iPhone >> >> > On Dec 27, 2018, at 2:09 PM, Spencer Brackett >> > wrote: >> > >> > What is the significance of using / or \ ? >> > >> >> On Thu, Dec 27, 2018 at 4:02 PM Sarah Goslee >> >> wrote: >> >> >> >> On Thu, Dec 27, 2018 at 2:03 PM Spencer Brackett >> >> wrote: >> >>> >> >>> Thank you for the help! I tried using the read.table command in my >> >> RStudio >> >>> using the following argument, and managed to open the file. >> >>> >> >>> GBM_protein_expression<-read.table(file.choose(), header=TRUE, sep=“/t”) >> >> >> >> Note that sep="/t" is NOT the same thing as the sep="\t" you were >> >> advised to use. >> >> >> >> >> >> >> >> >> >>> >> >>> However, my data did not unpack as yours did. I again only received a >> >> table >> >>> of true and flase distinctions per column, and my environment tab says >> >> that >> >>> there is 0 observations upon 0 variables. >> >>> >> >>> I believe I should be getting data similar to what you got, as it would >> >>> appear that your’s actually contains relevant gene/protein expression >> >> info. >> >>> >> >>> On Thu, Dec 27, 2018 at 6:21 AM Federico Calboli < >> >>> federico.calb...@kuleuven.be> wrote: >> >>> >> >>>> Once you have your TSV files just use something as >> >>>> >> >>>> x = read.table('protein_expression.tsv', h = T, sep = '\t') >> >>>> >> >>>> Do not copy paste the code of this email because it is formatted and >> >> would >> >>>> not work in R. >> >>>> >> >>>> >> >>>> Best >> >>>> >> >>>> F >> >>>> >> >>>> PS the data looks like this to me >> >>>> >> >>>> head(x) >> >>>> icgc_donor_id project_code icgc_specimen_id icgc_sample_id >> >>>> submitted_sample_id analysis_idantibody_id gene_name >> >>>> 1 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 97765 14-3-3_epsilon-M-C YWHAE >> >>>> 2 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 97765 4E-BP1-R-V EIF4EBP1 >> >>>> 3 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 977654E-BP1_pS65-R-V EIF4EBP1 >> >>>> 4 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 977654E-BP1_pT37-R-V EIF4EBP1 >> >>>> 5 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 977654E-BP1_pT70-R-C EIF4EBP1 >> >>>> 6 DO12370 GBM-US SP26475 SA131594 >> >>>> TCGA-19-5960-01A-13-1900-20 97765 53BP1-R-C TP53BP1 >> >>>> gene_stable_id gene_build_version normalized_expression_level >> >>>> verification_status verification_platform >> >>>> 1 NA NA -1.1636330 >> >>>> not testedNA >> >>>> 2 NA NA -1.7969721 >> >>>> not testedNA >> >>>> 3 NA NA -0.7256390 >> >>>> not testedNA >> >>>> 4 NA NA 0.6498421 >> >>>> not testedNA >> >>>> 5 NA NA -1.0262844 >> >>>> not testedNA >> >>>> 6 NA
Re: [R] you are making it far too difficult
“\t” is an escape sequence which signifies one tab character. “/t” is NOT an escape sequence, and to R, looks like a very brief file path. Sent from my iPhone > On Dec 27, 2018, at 2:09 PM, Spencer Brackett > wrote: > > What is the significance of using / or \ ? > >> On Thu, Dec 27, 2018 at 4:02 PM Sarah Goslee wrote: >> >> On Thu, Dec 27, 2018 at 2:03 PM Spencer Brackett >> wrote: >>> >>> Thank you for the help! I tried using the read.table command in my >> RStudio >>> using the following argument, and managed to open the file. >>> >>> GBM_protein_expression<-read.table(file.choose(), header=TRUE, sep=“/t”) >> >> Note that sep="/t" is NOT the same thing as the sep="\t" you were >> advised to use. >> >> >> >> >>> >>> However, my data did not unpack as yours did. I again only received a >> table >>> of true and flase distinctions per column, and my environment tab says >> that >>> there is 0 observations upon 0 variables. >>> >>> I believe I should be getting data similar to what you got, as it would >>> appear that your’s actually contains relevant gene/protein expression >> info. >>> >>> On Thu, Dec 27, 2018 at 6:21 AM Federico Calboli < >>> federico.calb...@kuleuven.be> wrote: >>> Once you have your TSV files just use something as x = read.table('protein_expression.tsv', h = T, sep = '\t') Do not copy paste the code of this email because it is formatted and >> would not work in R. Best F PS the data looks like this to me head(x) icgc_donor_id project_code icgc_specimen_id icgc_sample_id submitted_sample_id analysis_idantibody_id gene_name 1 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 97765 14-3-3_epsilon-M-C YWHAE 2 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 97765 4E-BP1-R-V EIF4EBP1 3 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 977654E-BP1_pS65-R-V EIF4EBP1 4 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 977654E-BP1_pT37-R-V EIF4EBP1 5 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 977654E-BP1_pT70-R-C EIF4EBP1 6 DO12370 GBM-US SP26475 SA131594 TCGA-19-5960-01A-13-1900-20 97765 53BP1-R-C TP53BP1 gene_stable_id gene_build_version normalized_expression_level verification_status verification_platform 1 NA NA -1.1636330 not testedNA 2 NA NA -1.7969721 not testedNA 3 NA NA -0.7256390 not testedNA 4 NA NA 0.6498421 not testedNA 5 NA NA -1.0262844 not testedNA 6 NA NA 1.5186400 not testedNA platform 1 M.D. Anderson Reverse Phase Protein Array Core 2 M.D. Anderson Reverse Phase Protein Array Core 3 M.D. Anderson Reverse Phase Protein Array Core 4 M.D. Anderson Reverse Phase Protein Array Core 5 M.D. Anderson Reverse Phase Protein Array Core 6 M.D. Anderson Reverse Phase Protein Array Core experimental_protocol 1 MDA_RPPA_Core >> http://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/blca/cgcc/mdanderson.org/mda_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt 2 MDA_RPPA_Core >> http://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/blca/cgcc/mdanderson.org/mda_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt 3 MDA_RPPA_Core >> http://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/blca/cgcc/mdanderson.org/mda_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt 4 MDA_RPPA_Core >> http://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/blca/cgcc/mdanderson.org/mda_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt 5 MDA_RPPA_Core >> http://tcga-data.nci.nih.gov/tcgafiles/ftp_auth/distro_ftpusers/anonymous/tumor/blca/cgcc/mdanderson.org/mda_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt 6 MDA_RPPA_Core >>
Re: [R] Fwd: UPDATE
Is the file being saved as .xls, .xlsx, .csv, .tsv, or .txt? On Wed, Dec 26, 2018 at 10:14 PM Spencer Brackett < spbracket...@saintjosephhs.com> wrote: > Follow up, > > Would read.txt also work, as I am certain that I have both datasets in > .txt files? As to a previous users question concern the .csv nature of the > supposed excel file, I am uncertain as to how this was translated as such. > The file is most certainly in excel. > > > On Thu, Dec 27, 2018 at 12:10 AM Spencer Brackett < > spbracket...@saintjosephhs.com> wrote: > >> Caitlin, >> >> I tried your command in both RGui and RStudio but both came up as >> errors. I believe I made a mistake somewhere I labeling/downloading the >> files, which is the source of the confusion in R. I will re-examine the >> files saved on my desktop to determine the error. Regardless, would it be >> better to use a read.table or read.csv function when attempting to download >> my datasets? I tried using read.xl on RStudio as this process seemed much >> easier, however, it would seem that my proclivity to error prevents such. >> >> Best, >> >> Spencer >> >> On Wed, Dec 26, 2018 at 11:55 PM Caitlin Gibbons >> wrote: >> >>> Does this help Spencer? The read.delim() function assumes a tab >>> character by default, but I specifically included it using the read.csv >>> function. The downloaded file is NOT an Excel file so this should help. >>> >>> GBM_protein_expression <- read.csv("C:/Users/Spencer/Desktop/GBM >>> protein_expression.tsv", sep=“\t”) >>> >>> Sent from my iPhone >>> >>> > On Dec 26, 2018, at 9:23 PM, Richard M. Heiberger >>> wrote: >>> > >>> > this is wrong because the file is a csv file. read_excel is designed >>> > for xls files. >>> > GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM >>> > protein_expression.csv") >>> > >>> > How did you get a csv? it downloads as tsv. >>> > >>> > the statement you should use is in base, no library() statement is >>> needed. >>> > >>> > GBM_protein_expression <- read.delim("C:/Users/Spencer/Desktop/GBM >>> > protein_expression.csv") >>> > >>> > read.delim is the same as read.csv except that it sets the sep >>> > argument to "\t". >>> > >>> > >>> > >>> > On Wed, Dec 26, 2018 at 11:11 PM Spencer Brackett >>> > wrote: >>> >> >>> >> Sorry, my mistake. >>> >> >>> >> So I could still use read.table and should I try using a .txt version >>> of >>> >> the file to avoid the silent changes you described? >>> >> >>> >> Also, when I tried to simply this process by downloading the dataset >>> onto >>> >> RStudio opposed to R (Gui) I received the following... >>> >> library(readxl) >>> >>> GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM >>> >> protein_expression.csv") >>> >> Error: Can't establish that the input is either xls or xlsx. >>> >>> View(GBM_protein_expression) >>> >> Error in View : object 'GBM_protein_expression' not found >>> >> Error in gzfile(file, mode) : cannot open the connection >>> >> In addition: Warning message: >>> >> In gzfile(file, mode) : >>> >> cannot open compressed file >>> >> >>> 'C:/Users/Spencer/AppData/Local/Temp/RtmpQNQrMh/input147c61fc5b52.rds', >>> >> probable reason 'No such file or directory' >>> >>> library(readxl) >>> >>> GBM_protein_expression <- >>> >> read_excel("C:/Users/Spencer/Desktop/GBM_protein_ expression.xlsx") >>> >> readxl works best with a newer version of the tibble package. >>> >> You currently have tibble v1.4.2. >>> >> Falling back to column name repair from tibble <= v1.4.2. >>> >> Message displays once per session. >>> >>> View(GBM_protein_expression) >>> >> >>> >> >>> >> Is this perhaps the result of lack of preview (which I did not >>> complete at >>> >> the time I hit import as the preview failed to load), or the fact >>> that the >>> >> excel file itself contains no numerical data, but only TRUE or
Re: [R] Fwd: UPDATE
Does this help Spencer? The read.delim() function assumes a tab character by default, but I specifically included it using the read.csv function. The downloaded file is NOT an Excel file so this should help. GBM_protein_expression <- read.csv("C:/Users/Spencer/Desktop/GBM protein_expression.tsv", sep=“\t”) Sent from my iPhone > On Dec 26, 2018, at 9:23 PM, Richard M. Heiberger wrote: > > this is wrong because the file is a csv file. read_excel is designed > for xls files. > GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM > protein_expression.csv") > > How did you get a csv? it downloads as tsv. > > the statement you should use is in base, no library() statement is needed. > > GBM_protein_expression <- read.delim("C:/Users/Spencer/Desktop/GBM > protein_expression.csv") > > read.delim is the same as read.csv except that it sets the sep > argument to "\t". > > > > On Wed, Dec 26, 2018 at 11:11 PM Spencer Brackett > wrote: >> >> Sorry, my mistake. >> >> So I could still use read.table and should I try using a .txt version of >> the file to avoid the silent changes you described? >> >> Also, when I tried to simply this process by downloading the dataset onto >> RStudio opposed to R (Gui) I received the following... >> library(readxl) >>> GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM >> protein_expression.csv") >> Error: Can't establish that the input is either xls or xlsx. >>> View(GBM_protein_expression) >> Error in View : object 'GBM_protein_expression' not found >> Error in gzfile(file, mode) : cannot open the connection >> In addition: Warning message: >> In gzfile(file, mode) : >> cannot open compressed file >> 'C:/Users/Spencer/AppData/Local/Temp/RtmpQNQrMh/input147c61fc5b52.rds', >> probable reason 'No such file or directory' >>> library(readxl) >>> GBM_protein_expression <- >> read_excel("C:/Users/Spencer/Desktop/GBM_protein_ expression.xlsx") >> readxl works best with a newer version of the tibble package. >> You currently have tibble v1.4.2. >> Falling back to column name repair from tibble <= v1.4.2. >> Message displays once per session. >>> View(GBM_protein_expression) >> >> >> Is this perhaps the result of lack of preview (which I did not complete at >> the time I hit import as the preview failed to load), or the fact that the >> excel file itself contains no numerical data, but only TRUE or FALSE >> entries? >> >> On Wed, Dec 26, 2018 at 10:59 PM Jeff Newmiller >> wrote: >> >>> Please always reply-all to keep the list involved. >>> >>> If you used Save As to change the data format to Excel AND the file >>> extension to xlsx, then yes, you should be able to read with readxl. I >>> don't recommend it, though... Excel often changes data silently and in >>> irregularly located places in your file. >>> >>> On December 26, 2018 7:38:16 PM PST, Spencer Brackett < >>> spbracket...@saintjosephhs.com> wrote: So even if I imported the file form ICGC to my desktop as an excel file, and can view and saved the data as such, it is still a TSV? On Wed, Dec 26, 2018 at 10:35 PM Jeff Newmiller wrote: > CSV and TSV are not Excel files. Yes, I know Excel will open them, but > that does not make them Excel files. > > Read a TSV file with read.table or read.csv, setting the sep argument to > "\t". > > On December 26, 2018 7:26:35 PM PST, Spencer Brackett < > spbracket...@saintjosephhs.com> wrote: >> I tried importing the file without preview and recieved the >> following >> >> library(readxl) >>> GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM >> protein_expression.csv") >> Error: Can't establish that the input is either xls or xlsx. >>> View(GBM_protein_expression) >> Error in View : object 'GBM_protein_expression' not found >> Error in gzfile(file, mode) : cannot open the connection >> In addition: Warning message: >> In gzfile(file, mode) : >> cannot open compressed file > > 'C:/Users/Spencer/AppData/Local/Temp/RtmpQNQrMh/input147c61fc5b52.rds', >> probable reason 'No such file or directory' >>> library(readxl) >>> GBM_protein_expression <- >> read_excel("C:/Users/Spencer/Desktop/GBM_protein_ expression.xlsx") >> readxl works best with a newer version of the tibble package. >> You currently have tibble v1.4.2. >> Falling back to column name repair from tibble <= v1.4.2. >> Message displays once per session. >>> View(GBM_protein_expression) >> >> Also, the area above my console says that no data is available in the >> table. Is this perhaps the result of lack of preview or the fact that >> the >> excel file itself contains no numerical data, but only TRUE or FALSE >> entries? >> >> On Wed, Dec 26, 2018 at 9:57 PM Spencer Brackett < >> spbracket...@saintjosephhs.com> wrote: >> >>> Hello
Re: [R] Help with DNA Methylation Analysis
No worries Spencer. There is no downloaded data? Nothing is physically stored on your hard drive? The dot in the path would be interpreted (no pun intended!) as something like the following: If the TCGA data was stored in a file named "tcga_data.dat" and it was in a directory named "C:\spencer", the 4th line of that script would set the path to "C:\spencer\tcga_data.dat" if you ran the script from that same folder. If your tcga data is not stored in the same file from which the script is being ran, it won't find any data to work with. Does this help? On Sun, Aug 26, 2018 at 5:34 PM Spencer Brackett < spbracket...@saintjosephhs.com> wrote: > Caitlin, > > Forgive me, but I’m not quite sure exactly what your question is asking. > The data is originally from the TCGA and I have it downloaded onto another > R script. I opened a new script to perform the functions I posted to this > forum because I was unable to input any other commands into the console > due to the fact that the translated data filled the entirety of said > consule. Perhaps overloaded it? Regardless, I was unable to input any > further commands. > > -Spencer Brackett > > > On Sun, Aug 26, 2018 at 8:27 PM Caitlin wrote: > >> You're welcome Spencer :) >> >> The 4th line: >> >> path <– "." >> >> refers to the current directory (the dot in other words). Is the data >> stored in the same directory where the code is being run? >> >> >> >> On Sun, Aug 26, 2018 at 5:22 PM Spencer Brackett < >> spbracket...@saintjosephhs.com> wrote: >> >>> Thank you! I will make note of that. Unfortunately, lines 1 and 4 of >>> the first portion of this analysis appear to be where the error begins... >>> to which several subsequent lines also come up as ‘errored’. Perhaps this >>> is an issue of the capitalization and/or spacing (something within the >>> text)? The proposed method for methylation data extraction is based on the >>> first third of the following TCGA workflow: >>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5302158/#!po=0.0715308 >>> >>> Best, >>> >>> Spencer Brackett >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Sun, Aug 26, 2018 at 8:07 PM Caitlin wrote: >>> >>>> Hi Spencer. >>>> >>>> Should you capitalize the following library import? >>>> >>>> library(summarizedExperiment) >>>> >>>> In other words, I think that line should be: >>>> >>>> library(SummarizedExperiment) >>>> >>>> Hope this helps. >>>> >>>> ~Caitlin >>>> >>>> >>>> >>>> >>>> On Sun, Aug 26, 2018 at 2:09 PM Spencer Brackett < >>>> spbracket...@saintjosephhs.com> wrote: >>>> >>>>> Good evening, >>>>> >>>>> I am attempting to run the following analysis on TCGA data, however >>>>> something is being reported as an error in my arguments... any ideas >>>>> as to >>>>> what is incorrect in the following? Thanks! >>>>> >>>>> 1 library(TCGAbiolinks) >>>>> 2 >>>>> 3 # Download the DNA methylation data: HumanMethylation450 LGG and GBM. >>>>> 4 path <– "." >>>>> 5 >>>>> 6 query.met <– TCGAquery(tumor = c("LGG","GBM"),"HumanMethylation450", >>>>> level = 3) >>>>> 7 TCGAdownload(query.met, path = path ) >>>>> 8 met <– TCGAprepare(query = query.met,dir = path, >>>>> 9 add.subtype = TRUE, add.clinical = TRUE, >>>>> 10summarizedExperiment = TRUE, >>>>> 11 save = TRUE, filename = "lgg_gbm_met.rda") >>>>> 12 >>>>> 13 # Download the expression data: IlluminaHiSeq_RNASeqV2 LGG and GBM. >>>>> 14 query.exp <– TCGAquery(tumor = c("lgg","gbm"), platform = >>>>> "IlluminaHiSeq_ >>>>> RNASeqV2",level = 3) >>>>> 15 >>>>> 16 TCGAdownload(query.exp,path = path, type = "rsem.genes.normalized_ >>>>> results") >>>>> 17 >>>>> 18 exp <– TCGAprepare(query = query.exp, dir = path, >>>>> 19summarizedExperiment = TRUE, >>>>
Re: [R] Error while running Vegas function in cpvSNP package
Hello, Please find attached a script where I tried to replicate the issue. I was unable to reproduce the error. Perhaps you can send me more details? Also, it appears the LD matrix you are using is not symmetric nor does it have 1's on the diagonal. Both of these things should be satisfied for the algorithm to work properly. Feel free to let me know if you continue to run into errors. Thanks, Caitlin On Thu, Sep 1, 2016 at 6:24 AM, MLSC <mlscm...@gmail.com> wrote: > Hello Sir, > > When I try to run vegas() function, I come across below errors, can > somebody help me in fixing this issue? > > > test<-vegas(snpsGSC, gr,ldMat,1000,correction=TRUE,seed=NULL, > verbose=FALSE) > Warning: coercing ldMatrix from data.frame to matrix. > Error in validObject(.Object) : > invalid class “VEGASResultCollection” object: members must all be > 'VEGASResult' classes > > test<-vegas(gs2, gr,ldMat,1000,correction=TRUE,seed=NULL, verbose=FALSE) > Warning: coercing ldMatrix from data.frame to matrix. > Error in validObject(.Object) : > invalid class “VEGASResultCollection” object: members must all be > 'VEGASResult' classes > > > Please find structure of objects used inside vegas(), below > > > > class(gs2) > [1] "GeneSetCollection" > attr(,"package") > [1] "GSEABase" > > gs2 > GeneSetCollection > names: NA (1 total) > unique identifiers: 730005, 23755, ..., 23762 (8 total) > types in collection: > geneIdType: NullIdentifier (1 total) > collectionType: NullCollection (1 total) > > snpsGSC > GeneSetCollection > names: NA (1 total) > unique identifiers: rs9608956, rs6518694, ..., rs2240176 (117 total) > types in collection: > geneIdType: AnnotationIdentifier (1 total) > collectionType: NullCollection (1 total) > > gr > GRanges object with 10357 ranges and 6 metadata columns: > seqnames ranges strand | P SNP > | > [1]chr22 [16114244, 16114244] * |0.9298 rs12157537 > [2]chr22 [16494187, 16494187] * |0.2571 rs8142331 > [3]chr22 [16855618, 16855618] * |0.3743 rs5747010 > [4]chr22 [17012935, 17012935] * |0.1005 rs9604821 > [5]chr22 [17057138, 17057138] * |0.5120 rs5746647 > ... ... ...... ... ... ... > [10353]chr22 [51171693, 51171693] * |0.6500rs756638 > [10354]chr22 [51175626, 51175626] * |0.5235 rs3810648 > [10355]chr22 [51178090, 51178090] * |0.2008 rs2285395 > [10356]chr22 [51181759, 51181759] * |0.4858 rs13056621 > [10357]chr22 [51211392, 51211392] * |0.2952 rs3888396 >Position Chromosome Start End > > [1] 16114244 chr22 16114244 16114244 > [2] 16494187 chr22 16494187 16494187 > [3] 16855618 chr22 16855618 16855618 > [4] 17012935 chr22 17012935 17012935 > [5] 17057138 chr22 17057138 17057138 > ... ...... ... ... > [10353] 51171693 chr22 51171693 51171693 > [10354] 51175626 chr22 51175626 51175626 > [10355] 51178090 chr22 51178090 51178090 > [10356] 51181759 chr22 51181759 51181759 > [10357] 51211392 chr22 51211392 51211392 > --- > seqinfo: 1 sequence from an unspecified genome; no seqlengths > > >ldMat >rs756638rs3810648rs2285395 rs13056621rs3888396 > rs133433 2.302381e-04 1.593234e-03 1.745740e-03 3.279513e-03 1.135283e-03 > rs4645824 3.435556e-04 2.872766e-03 6.350416e-05 9.143595e-04 2.032939e-03 > rs12165592 1.164639e-04 6.331347e-03 1.911289e-03 2.124385e-03 7.972265e-04 > rs2413348 1.148297e-04 4.106582e-03 1.857187e-03 9.805785e-04 5.707284e-04 > rs5755729 6.863351e-04 7.718787e-04 1.794326e-04 9.102677e-05 1.835078e-05 > rs5755730 6.606449e-04 1.817608e-03 2.795217e-04 2.912946e-04 1.582141e-03 > rs738207 3.193647e-03 1.833686e-06 2.162108e-06 1.377696e-03 3.024123e-03 > rs28528068 5.097169e-04 9.289022e-05 8.253080e-05 9.775527e-06 4.618146e-04 > rs9610304 2.185120e-05 1.753900e-03 3.760546e-04 4.235130e-06 7.791331e-04 > rs5999844 1.511305e-04 5.263161e-05 1.594619e-04 3.668878e-04 9.886630e-05 > rs8136332 1.466643e-04 6.929900e-04 1.128017e-05 1.327246e-03 3.758860e-04 > rs909704 9.107431e-05 6.988505e-05 8.734125e-04 6.070963e-04 1.666259e-05 > rs10483191 1.563958e-04 6.843857e-04 1.050799e-05 1.289273e-03 3.944796e-04 > rs880211 7.008708e-05 3.167541e-03 6.418652e-04 2.483367e-04 1.344723e-03 &
[R] Constructing a graph with ggplot2.
Hi all. I am attempting to graph data from three lab teams with milligrams of maltose shown on the y-axis and 5 pH values (5 to 9) on the x-axis as labels. Unfortunately, I can't seem to construct the graph in this manner using the following code: ph1 = c(5, 6, 7, 8, 9) ph2 = ph3 = ph1 e1 = c(0.191, 0.154, 0.179, 0.073, 0.009) e2 = c(0, 0.029, 0.054, 0.055, 0.024) e3 = c(0.019, 0.027, 0.063, 0.029, 0.039) set.seed(1) df1 - data.frame(e1 = sort(runif(5, 0.05, 0.25)), e2 = sort(runif(5, 0.05, 0.25)), e3 = sort(runif(5, 0.05, 0.25)), ph1 = sort(runif(5, 1, 100)), ph2 = sort(runif(5, 1, 100)), ph3 = sort(runif(5, 1, 100)) )### reshape this to give a column indicating group df2 - with(df1, as.data.frame(cbind( c(ph1, ph2, ph3), c(e1, e2, e3), rep(seq(3), each=5) ) )) colnames(df2) - c(ph,maltose_in_mg,team) df2$team - as.factor(df2$team) library(ggplot2) ggplot(df2, aes(x=ph, y=maltose_in_mg, col=team)) + geom_line() Since I am still learning both R and ggplot2, I don't know how to proceed beyond what I have included here. Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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] Problem loading package 'JGR' using R-2.15.0 (Win32).
Hi all. Upon attempting to load the 'JGR' package, on a Win32 machine (SP3), a pop-up message appeared stating that R had encountered a problem and needs to close. Has anyone else encountered this? Thanks. ~Caitlin [[alternative HTML version deleted]] __ R-help@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] No announcement of version 2.14.2
Hi all. I just noticed that the release of version 2.14.2 was not announced on the R home page. Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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] Plotting multiple vectors in one window?
Hi all. Using the following code: plot(bsa, abs, col='blue', pch=16, xlim=c(0, 25), ylim=c(0.0, 1.0), xlab = expression(paste(BSA, (, mu, g), sep=)), ylab=expression(A[595])) plot(unknown1, abs2, col='blue', pch=16, xlim=c(0, 25), ylim=c(0.0, 1.0), xlab = expression(paste(Unknown_1, (, mu, g), sep=)), ylab=expression(A[595])) plot(unknown2, abs3, col='blue', pch=16, xlim=c(0, 25), ylim=c(0.0, 1.0), xlab = expression(paste(Unknown_2, (, mu, g), sep=)), ylab=expression(A[595])) myline.fit - lm(abs ~ bsa) summary(myline.fit) abline(myline.fit) axis(side=1, col=gray, tck=1, lty=dotted) axis(side=2, col=gray, tck=1, lty=dotted) box() minor.tick(nx=2, ny=2, tick.ratio=0.5) title(main=Quantifying Protein Content via Bradford Microassay, col='blue') ...I have constructed three individual plots. Is there a convenient way to plot three vectors (not from a file) into one window? With three individual lines of best fit? Probably using three symbols, e.g., pch=16, 17, 18, to distinguish them. Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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] Creating a scatterplot with sequential dates on x-axis?
Hi all. I need to plot 30 values and I'd like the x-axis to have 30 dates values, e.g., 5/1/2011, 5/2/2011, etc. so an observer could see how the values correspond as the month progresses. Is there a convenient function I could use? I considered creating two vectors, x and y, then simply plotting those. Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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] Constructing a histogram with words as labels as height as frequency?
Hi all. I need to construct a plot showing words on the x-axis and how many times each word was given as a verbal response on the y-axis as solid bar (frequency). Is there a convenient function to do this in R? I considered hist(), but I'm not sure how to construct the text file. Example: apple, 2 pear, 14 house, 1 beach, 5 computer, 15 Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Performance Difference? Windows vs. Linux
Hi Brigid, I haven't used it yet, but I would suggest profiling your code with 'Rprof' on both a Windows and Linux machine. ?Rprof for details. Hope this helps, ~Caitlin On Fri, Mar 18, 2011 at 3:00 PM, Brigid Mooney bkmoo...@gmail.com wrote: I'm not trying to start a Windows vs. Linux debate, but I've been using R on a Windows machine for a while, and was recently wondering if R's performance would be faster on a Linux machine. And similarly, if any incremental increase in processing speed would be worth the time it would take me to migrate my entire system to Linux (including a database that I access via an R package.) I don't know how much it matters what R is doing - but I've got R pulling a large amount data from a database, performing many complex computations on that data, and then writing output data to a database. Thanks so much for the input, Brigid __ R-help@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. [[alternative HTML version deleted]] __ R-help@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 with setting the y-axis in a plot.
Hi all. I'm working on an assignment for a psychology class and I am not sure how to adjust the y-axis so it displays the range: 0, 5, 10, 15 The code below is almost ideal: lsd = c(3, 5, 13) mar = c(1, 2, 3) g_range - range(0, lsd, mar) plot(lsd, type=o, col=blue, ylim=g_range, axes=FALSE, ann=FALSE) axis(1, at=1:3, lab=c(Low,Med,High)) axis(2, las=1, at=5*0:max(mar)) box() lines(mar, type=o, pch=22, lty=2, col=red) title(main=The Effect of Drug Dosage and Type on the Number of Hallucinations, col.main=red, font.main=4) title(xlab=Dose, col.lab=rgb(0,0.5,0)) title(ylab=Number of Hallucinations, col.lab=rgb(0,0.5,0)) Thanks, ~Caitlin [[alternative HTML version deleted]] __ R-help@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] importing columns as factors
I have a large csv table I am trying to read into R. I would like each column to be of type factor. However, most columns have only numeral entries (e.g. likert scales), so are automatically imported as type numeric. Is there a way to convert ALL columns to be of type factor, without having to convert each column manually? Cheers, Caitlin __ R-help@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] Unable to connect to 'cran.r-project.org' on port 80.
Hi. I recently upgraded my R installation to 2.11.0 on Windows XP (SP3) without changing any firewall settings. When I attempted to update my package list, the 'Select a mirror' took much longer than it normally did, and after I finally selected the site, I saw: --- Please select a CRAN mirror for use in this session --- Warning message: In open.connection(con, r) : unable to connect to 'cran.r-project.org' on port 80. The only action I performed in a prior session was to download and install several packages including Bioconductor. Any idea what the problem might be? Thanks, Caitlin [[alternative HTML version deleted]] __ R-help@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.