[R] roxygen2 error - x$tag operator is invalid for atomic vectors
Ben Tupper
btupper at bigelow.org
Wed Jan 17 14:32:46 CET 2018
Hi,
It's not really a roxygen thing but a subsetting thing.
> x = c(foo = 7, tag = 8)
> x$tag
Error in x$tag : $ operator is invalid for atomic vectors
For simple vectors you want ...
> x['tag']
tag
8
... or ...
> x[['tag']]
[1] 8
See more at
> ?`$`
Cheers,
Ben
> On Jan 17, 2018, at 8:16 AM, Martin Møller Skarbiniks Pedersen <traxplayer at gmail.com> wrote:
>
> Hi,
>
> I am trying to create my first R package.
> I will later today put the files on Github.
>
> However I gets this error and I can't find any reason for it:
>
> R> roxygen2::roxygenise()
> First time using roxygen2. Upgrading automatically...
> Error in x$tag : $ operator is invalid for atomic vectors
> R>
>
> Any ideas?
>
> Regards
> Martin M. S. Pedersen
>
> [[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.
Ben Tupper
Bigelow Laboratory for Ocean Sciences
60 Bigelow Drive, P.O. Box 380
East Boothbay, Maine 04544
http://www.bigelow.org
Ecocast Reports: http://seascapemodeling.org/ecocast.html
Tick Reports: https://report.bigelow.org/tick/
Jellyfish Reports: https://jellyfish.bigelow.org/jellyfish/
[[alternative HTML version deleted]]
More information about the R-help
mailing list