You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.
Hey class!
I'm really at a loss for what is happening. I am trying to add a function to the R package "powers" for hw07, but it seems that it won't recognize the function I am trying to add.
One thing to note, is that in the NAMESPACE file, this function does not show up, although I have exported it (see below).
I've tried restarting R, but beyond this, I have no idea why this function is not being added to the NAMESPACE and/or not being recognized.
This is the code I have:
#'#' Apply a useful root
#'
#'
#'@param x the vector for which you want the root
#'@param y the integer root that you want to take (ie square root = 2, cube root = 3, etc)
#'@param plot_it Display a plot of \code{x} vs the output? Use logical.
#' \code{FALSE} by default.
#'
#'@return A vector that is the:
#' \itemize{
#' \item root (for \code{root})
#'}
#' of \code{x}.
#'
#'
#'@Rdname root
#'@export
root <- function(x, y, plot_it = FALSE) pow(x, a=1/y, plot_it=plot_it)
The text was updated successfully, but these errors were encountered:
Maybe this is a hint - the warning that comes up after checking the package, though after several searches about what this means, I'm still unsure how to fix my issue.
Not sure if this is helpful or not, but if you check your auto-generated root.Rd file, do you see \usage{ root(x,y) }? If so then I think this file is being written with the wrong \usage{} somehow, since I as far as I understand about R package documentation, it is looking for \usage{ root(x,y,plot_it) } and doesn't find it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey class!
I'm really at a loss for what is happening. I am trying to add a function to the R package "powers" for hw07, but it seems that it won't recognize the function I am trying to add.
One thing to note, is that in the NAMESPACE file, this function does not show up, although I have exported it (see below).
I've tried restarting R, but beyond this, I have no idea why this function is not being added to the NAMESPACE and/or not being recognized.
This is the code I have:
#'#' Apply a useful root
#'
#'
#'@param x the vector for which you want the root
#'@param y the integer root that you want to take (ie square root = 2, cube root = 3, etc)
#'@param plot_it Display a plot of \code{x} vs the output? Use logical.
#' \code{FALSE} by default.
#'
#'@return A vector that is the:
#' \itemize{
#' \item root (for \code{root})
#'}
#' of \code{x}.
#'
#'
#'@Rdname root
#'@export
root <- function(x, y, plot_it = FALSE) pow(x, a=1/y, plot_it=plot_it)
The text was updated successfully, but these errors were encountered: