[R] Output for pasting multiple vectors
Richard O'Keefe
r@oknz @end|ng |rom gm@||@com
Tue Jun 25 23:05:46 CEST 2019
This has nothing to do with your problem, but given the heavy use of "="
to bind keyword parameters in R, I find the use of "=" for assignment as
well confusing. It makes code harder to read than it needs to be.
The historic " <- " assignment makes the distinction obvious.
On Wed, 26 Jun 2019 at 03:12, Spencer Brackett <
spbrackett20 using saintjosephhs.com> wrote:
> Hello,
>
> The following is the bit of code I was having trouble with reproducing;
> (meth) being the set matrix of the dataset I am working within R...
>
> colnames(meth) = sapply(colnames(meth), function(i){
> c1 = strsplit(i,split ='.', fixed = T)[[1]]
> c1[4] = paste(strsplit(c1[4],split = "",fixed = T)[[1]][1:2],collapse =
> "")
> paste(c1,collapse = ".")
>
> And this is the reprex () that R generated...
>
> Error in parse(text = x, keep.source = TRUE) :
> <text>:28:0: unexpected end of input
> 26:
> 27:
> ^
>
> Does this perhaps make my question clearer? Or should I provide a more
> extensive reprex of my work for background?
>
> P.S. Above text should be formatted correctly this time (according to the
> posting guide rules), if not, I will try resetting my client email again.
>
> Best,
>
> Spencer
>
>
> On Tue, Jun 25, 2019 at 9:29 AM Spencer Brackett <
> spbrackett20 using saintjosephhs.com> wrote:
>
> > Mr. Barradas,
> >
> > My apologies for the delayed response. No, (meth) is not a dataset
> > within CRAN. I’m not sure why my supervisor wrote that in as the object
> for
> > the bit of script I shared previously. Assuming that the correct object
> for
> > this particular command is to be a data, the one with which we are
> working
> > is a TCGA dataset containing Glioblastoma data. We are attempting to
> > analyze available methylation information.
> >
> > Best,
> >
> > Spencer
> >
> >
> > On Sat, Jun 22, 2019 at 3:08 AM Rui Barradas <ruipbarradas using sapo.pt>
> wrote:
> >
> >> Hello,
> >>
> >> I cannot find the dataset. meth is a (CRAN) package dataset?
> >>
> >> Rui barradas
> >>
> >> Às 02:11 de 22/06/19, Spencer Brackett escreveu:
> >> > Hello,
> >> >
> >> > I am attempting to paste multiple vectors using the paste() function
> >> for a
> >> > dataset that I'm working with. Shouldn't I be receiving some kind of
> >> > output as a result of the following?
> >> >
> >> > meth=as.matrix(meth)
> >> >> colnames(meth) = sapply(colnames(meth), function(i){
> >> > + c1 = strsplit(i,split ='.', fixed = T)[[1]]
> >> > + c1[4] = paste(strsplit(c1[4],split = "",fixed =
> T)[[1]][1:2],collapse
> >> =
> >> > "")
> >> > + paste(c1,collapse = ".")
> >> > + {
> >> >
> >> > Best,
> >> >
> >> > Spencer Brackett
> >> >
> >> > [[alternative HTML version deleted]]
> >> >
> >> > ______________________________________________
> >> > R-help using 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 using 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]]
More information about the R-help
mailing list