Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Duncan Murdoch

On 17/01/2018 8:37 AM, Martin Møller Skarbiniks Pedersen wrote:

On 17 January 2018 at 14:30, Eric Berger  wrote:


This is an error message from R.
For example, if you give the following R commands

  a <- 5
a$foo

This will generate the error message:
Error in a$foo : $ operator is invalid for atomic vectors

So you can search for the string 'x$tag' in your code (or possibly in the
package).



OK thanks.

Something else must be wrong because my package should only contain a
data.frame saved in .RData file


Immediately after the error, run traceback() to see where that code is 
being found.  The output might not mean much to you, but perhaps others 
here will spot the issue.


If that doesn't make the problem obvious, then post a link to your 
Github source and someone else will be able to try it.


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.

Re: [R] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Martin Møller Skarbiniks Pedersen
On 17 January 2018 at 14:30, Eric Berger  wrote:

> This is an error message from R.
> For example, if you give the following R commands
> >  a <- 5
> > a$foo
> This will generate the error message:
> Error in a$foo : $ operator is invalid for atomic vectors
>
> So you can search for the string 'x$tag' in your code (or possibly in the
> package).
>

OK thanks.

Something else must be wrong because my package should only contain a
data.frame saved in .RData file

Regards
Martin

[[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] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Ben Tupper
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 
>  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@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]]

__
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] roxygen2 error - x$tag operator is invalid for atomic vectors

2018-01-17 Thread Eric Berger
This is an error message from R.
For example, if you give the following R commands
>  a <- 5
> a$foo
This will generate the error message:
Error in a$foo : $ operator is invalid for atomic vectors

So you can search for the string 'x$tag' in your code (or possibly in the
package).

HTH,
Eric


On Wed, Jan 17, 2018 at 3:16 PM, Martin Møller Skarbiniks Pedersen <
traxpla...@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@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.