[R] I have Problem using the Pipe Command

Richard O'Keefe r@oknz @end|ng |rom gm@||@com
Wed Jun 19 12:23:17 CEST 2024


You can get an external 1TB hard drive for NZD 60 if you shop around.
That's USD 37 or GBP 29.
How much data do you have and how valuable?
You don't need a whole 'nother laptop to backup!
If you did, you could get a 2nd-hand laptop adequate for the purpose
for NZD 150 (USD 92, GBP 72).
Again, how much data do you have and how valuable?
A new 64 GB memory stick is just NZD 8 (I'll let you do your own
currency conversion).

R works very well with data held outside R in formats that are not R-specific.
I would expect (the master copies of) your documents and data to be held
outside the directory where R is installed and in formats (like .csv)
that are the
same no matter which version of R you use to read them, so it's not clear why
upgrading R should put your documents and data at risk.

In any case:
 - which files should be backed up?  All of them.
 - when is the right time to back them up?  Now.
 - what should it cost me to take backups?   A lot less than losing your data.
   And even if you buy another 2nd-hand laptop to do it, less than a day's pay.

On Wed, 19 Jun 2024 at 20:08, Ogbos Okike <giftedlife2014 using gmail.com> wrote:
>
> Dear Martin,
> I agree with you. I am anxious to upgrade. But I am afraid of losing some
> data on my only one system. I do not have enough backup.
>
> I am planning to buy a backup laptop before venturing to upgrade.
>
> But if there is any possibility of upgrading without losing my
> documents/data, I would gladly go with that.
>
> Please let me know whether it is possible.
>
> Many thanks for your time.
>
> Warm regards
> Ogbos
>
> On Wed, Jun 19, 2024 at 8:38 AM Martin Maechler <maechler using stat.math.ethz.ch>
> wrote:
>
> > >>>>> Duncan Murdoch
> > >>>>>     on Tue, 18 Jun 2024 12:25:49 -0400 writes:
> >
> >     > On 2024-06-18 12:17 p.m., Ben Bolker wrote:
> >     >> You probably have to update your R version. The native pipe |>
> > wasn't
> >     >> introduced until R version 4.4.  R.version.string (among others)
> > will
> >     >> tell you what version you have.
> >
> >     > Typo: it was introduced in R 4.1.0.
> >
> >     > Another possible problem is with line breaks.  This works:
> >
> >     > 1:10 |>
> >     > mean()
> >
> >     > but this fails:
> >
> >     > 1:10
> >     > |> mean()
> >
> >     > Duncan Murdoch
> >
> > Yes, of course (as I know you know), the same way that
> >
> >     >  1:10
> >     >  + 1
> >
> > does "not" work.
> >
> >
> >
> >     >> If you don't want to do that, install and load the 'magrittr'
> > package
> >     >> and change |> to %>% everywhere.
> >
> > I really think that in June 2024  you (Ogbos) should not run
> > "productively" an R version that is older than May 2021 (where R
> > 4.1.0 was released) :
> >
> >   $ R-4.1.0 --version | head 1
> >   R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
> >
> >   $ R-4.1.0 --vanilla -s -e '1:10|>sum()'
> >   [1] 55
> >   $
> >
> > So upgrading your R to current (R 4.4.1)  is *very* much recommended.
> >
> > Martin Maechler
> >
> >
> >     >> On 2024-06-18 12:13 p.m., Ogbos Okike wrote:
> >     >>> Greetings to everyone and thank you for your readiness to help.
> >     >>>
> >     >>> I have problems using the pipe command (|>).
> >     >>>
> >     >>> Once I have it in any script on my system, it won't.
> >     >>>
> >     >>> The error message will say:
> >     >>>
> >     >>> unexpected '>'
> >     >>> I loaded the two packages below to see if it would handle it. But
> > the
> >     >>> problem remains.
> >     >>> library(magrittr)
> >     >>> library(dplyr)
> >     >>>
> >     >>> I searched to see if there was a way to install the command. But I
> > was not
> >     >>> successful.
> >     >>>
> >     >>> Please tell me what to do to be able to use the pipe command on my
> > system.
> >     >>> I would be grateful for any help.
> >     >>> Thank you.
> >     >>>
> >     >>> Sincerely yours
> >     >>> Ogbos
> >     >>>
> >     >>> [[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.
> >     >>
> >     >> ______________________________________________
> >     >> 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.
> >
> >     > ______________________________________________
> >     > 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.
> >
> > ______________________________________________
> > 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.



More information about the R-help mailing list