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. If you don't want to do that, install and load the 'magrittr' package and change |> to %>% everywhere. 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 at 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.
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> > If you don't want to do that, install and load the 'magrittr' package > and change |> to %>% everywhere. > > 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 at 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 at 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.
Yes, Ben and others. Many thanks for your swift response. I have quickly installed the 'magrittr' package. It was installed successfully. But I tried to edit it using EDIT(magrittr). But it didn't work. Please, guide me further on how to edit it. Thank you very much. Ogbos On Tue, Jun 18, 2024 at 5:18?PM Ben Bolker <bbolker at gmail.com> 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. > > If you don't want to do that, install and load the 'magrittr' package > and change |> to %>% everywhere. > > 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 at 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 at 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]]