Proper way to add data in the R package -


i creating package data in using devtools package. far package works functions stored in package, however, cannot make data on package work.

i tried follow format used hadley in ggplot2 documentation. have simple data far has 6 rows , 2 columns.

i used following documentation on r file.

#' jdutils package #' @name jdutils #' @doctype package null  #' sample state plane coordinates #' #' dataset containing x coordinates , y coordinates in state plane coordinate #' system in feet. #' #' \itemize{ #'  \item x_coord_as_numeric. x coordinate of station #'  \item y_coord_as_numeric. y coordinate of station #' } #' #' @doctype data #' @name samplestations #' @keywords datasets #' @usage data(samplestations) #' @format dataframe 6 rows , 2 variables null 

after creating package , installing it, when try run following command load data error.

> data(samplestations) warning message: in data(samplestations) : data set ‘samplestations’ not found 

i couldn't find underlying problem. suggestion appreciated.

a data file samplestations.rda stored in data folder of package.

description of package added

package: jdutils title: package (one line, title case) version: 0.0.0.9000 authors@r: person("first", "last", , "first.last@example.com", role = c("aut", "cre")) description: package (one paragraph) depends: r (>= 3.1.0) license: mit lazydata: true maintainer: jan dev <janesh.devkota@gmail.com> 


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -