similar to: roxygen2 error - x$tag operator is invalid for atomic vectors

Displaying 20 results from an estimated 2000 matches similar to: "roxygen2 error - x$tag operator is invalid for atomic vectors"

2017 Dec 16
5
Generating help files for a function
Hello everyone! I'm in the process of writing a package, and I'm using the lovely "R Package" book as a guideline. However, in the midst of my work, I discovered that I had omitted a function and am now putting in it the package. Not a problem. But the problem is the help file. What is the best way to generate a help file "after the fact" like that, please? Thank
2018 Jan 17
0
roxygen2 error - x$tag operator is invalid for atomic vectors
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 < traxplayer at
2018 Jan 02
1
httr::content without message
Thanks to all that replied. I had just looked through the httr code and sure enough for a .csv mime time it calls readr::read_csv(). The httr::content docs suggest not using automatic parsing in a package, rather to determine mime type and parse yourself and Ben's suggestion also works if I do: junk <- readr::read_csv(r1$content, col_types = cols()) Perfect. Using httr rather than
2017 Sep 06
1
rgdal error when trying to import raster
Indeed, Ben, but the question was something more like it is not a Dependency, just Suggested, so why the error... John: If you read the Introduction to the 'raster' package vignette, it indicates that some input formats are supported within the raster package and some rely on other packages. Clearly the attempt to read a TIFF was an example of the latter. Had you used a different input
2017 Aug 06
1
Nested for loop
Hi Ben, That's exactly right! Except for each set it's the sample population that is 400, 800 or 300. I want to take 3 samples, each of 100, where only the population differs. I can do this separately, but I'm having trouble putting them all on the same graph. I'd like to have sample on the x axis (1-300) and estimate on the y axis. I want to show how population affects the
2017 Dec 16
0
Generating help files for a function
Hi, If you are using roxygen-style function documentation then why not use devtools::document()? Ben > On Dec 16, 2017, at 9:00 AM, Erin Hodgess <erinm.hodgess at gmail.com> wrote: > > Hello everyone! > > I'm in the process of writing a package, and I'm using the lovely "R > Package" book as a guideline. > > However, in the midst of my
2017 Sep 06
2
rgdal error when trying to import raster
Dear useRs, I am trying to import a raster with the line: nlcd <- raster("/home/jpolo/NRI/nlcd_nri5000.tif") And I keep getting an error like this: "Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,? : ? there is no package called 'rgdal' Error in .rasterObjectFromFile(x, band = band, objecttype =
2018 Jan 02
4
httr::content without message
Hi All: I am using httr to download files form a service, in this case a .csv file. When I use httr::content on the result, I get a message. Since this will be in a package. I want to suppress the message, but haven't figured out how to do so. The following should reproduce the result: myURL <-
2018 Jan 02
0
httr::content without message
Ahoy! That's a message generated by the readr::read_table() function (or it's friends). You can suppress it a number of ways, but this should work as httr::content() will pass through arguments, like col_types = cols(), to the file reader. junk <- httr::content(r1, col_types = cols()) See more here... https://blog.rstudio.com/2016/08/05/readr-1-0-0/
2017 Sep 06
0
rgdal error when trying to import raster
Hi, The message "there is no package called 'rgdal'" means that you don't have rgdal installed. https://cran.r-project.org/web/packages/rgdal/index.html Also, you will get very good patial-centric help if you subscribed to r-sig-geo here https://stat.ethz.ch/mailman/listinfo/r-sig-geo Cheers, Ben > On Sep 6, 2017, at 2:52 PM, john polo <jpolo at mail.usf.edu>
2017 Aug 05
2
Nested for loop
Hi! Thanks for taking the time to read this. The code below creates a graph that takes 100 samples that are between 5% and 15% of the population (400). What I'd like to do, however, is add two other sections to the graph. It would look something like this: from 1-100 samples take 100 samples that are between 5% and 15% of the population (400). From 101-200 take 100 samples that are between
2017 Aug 06
0
Nested for loop
Hi Kirsten, I can run your example code but I can't quite follow your division of sampling. Can you restate the the task? Below is what I think you are asking for, but I have the feeling I may be off the mark. Set A: 400 samples, draw 100 in range of 5 to 15 Set B: 800 samples, draw 100 in range of 5 to 15 Set C: 300 samples, draw 100 in range of 5 to 15 Ben > On Aug 5, 2017, at
2017 Aug 17
3
really dumb question with building/creating a new package.
Hello. I am creating a new RcmdrPlugin package. However, I am getting some very odd messages. R CMD build RcmdrPlugin.gstats_1.0.0 ERROR cannot change to directory ?RcmdrPlugin.gstats_1.0.0? es-macbook-air:~ emhodgess$ R CMD check RcmdrPlugin.gstats_1.0.0 Warning: ?RcmdrPlugin.gstats_1.0.0? is neither a file nor directory, skipping es-macbook-air:~ emhodgess$ cd RcmdrPlugin.gstats/
2017 Oct 24
5
Problem Subsetting Rows that Have NA's
This has every appearance of being a bug. If it is not a bug, can someone tell me what I am asking for when I ask for "x[x[,2]==0,]". Thanks. > #here is the toy dataset > x <- rbind(c(1,1),c(2,2),c(3,3),c(4,0),c(5,0),c(6,NA), + c(7,NA),c(8,NA),c(9,NA),c(10,NA) + ) > x [,1] [,2] [1,] 1 1 [2,] 2 2 [3,] 3 3 [4,] 4 0 [5,] 5 0
2018 Jan 17
1
roxygen2 error - x$tag operator is invalid for atomic vectors
On 17 January 2018 at 14:30, Eric Berger <ericjberger at gmail.com> 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
2017 Aug 14
4
Help creating the IBM Randu function
Dear all, I am trying to learn functions in R and 3D plotting so I decided to try to plot the famous bad PRNG Randu from IBM(1). However something is not correct in the function I have created. First I define the function RANDU like this: > RANDU <- function(num) { return (65539*num)%%(2^31) } and test that it works for a seed of 1: > RANDU(1) [1] 65539 but if I want the next
2011 Nov 13
0
Roxygen2: version 2.2
# Roxygen2 The premise of `roxygen2` is simple: describe your functions in comments next to where their definitions and `roxygen2` will process your source code and comments to produce R compatible Rd files. Here's a simple example from the `stringr` package: ? ? #' The length of a string (in characters).? ? #'? ? #' @param string input character vector? ? #' @return numeric
2011 Nov 13
0
Roxygen2: version 2.2
# Roxygen2 The premise of `roxygen2` is simple: describe your functions in comments next to where their definitions and `roxygen2` will process your source code and comments to produce R compatible Rd files. Here's a simple example from the `stringr` package: ? ? #' The length of a string (in characters).? ? #'? ? #' @param string input character vector? ? #' @return numeric
2017 Dec 03
5
Rcpp, dyn.load and C++ problems
Hi, I have written a small C++ function and compile it. However in R I can't see the function I have defined in C++. I have read some web-pages about Rcpp and C++ but it is a bit confusion for me. Anyway, This is the C++-code: #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] List compute_values_cpp(int totalPoints = 1e5, double angle_increment = 0.01, int radius =
2018 Jan 17
2
Help making first dataset R package
Hi, I am trying to make my first R package containing only a single data.frame and documentation. All code can be found at: https://github.com/MartinMSPedersen/folkeafstemninger When I check the package I get four warnings. I will list all warnings in this email because they migth be connected. 1. * checking if this is a source package ... WARNING Subdirectory ?src? contains: