Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refinements to R code generator #433

Closed
ashrith opened this issue Dec 21, 2020 · 2 comments
Closed

Refinements to R code generator #433

ashrith opened this issue Dec 21, 2020 · 2 comments
Assignees
Labels
feature Feature request r Related to R driver
Milestone

Comments

@ashrith
Copy link
Member

ashrith commented Dec 21, 2020

wave/r/R/ui.R

Line 50 in 94cd7cc

#' @return A Breadcrumb instance.

The line referenced above is just an example. The following needs to be done to every function in the ui.R file. All the functions in ui.R need to have a #' @export so that when the package is compiled roxygen2 (the library the generates the NAMESPACE knows what function to pickup and place into the R environment.

The roxygen has to re-run on the functions to generate new comments with #' @export

@ashrith
Copy link
Member Author

ashrith commented Dec 21, 2020

#' Function to create a new page or check the existence of a page
#' This function is used to create a new page on a site. 
#' If the name of the page is an empty string then the function returns an error. 
#' If the name of the page does not have a `/` it returns a error. 
#' If another function calls the page function (by setting fun_flag = TRUE) then a new page is not created
#' but the existence of a page is checked. Under this condition of the page does not exist, then the function 
#' returns an error.
#' \code{fun_flag} is a variable that is used when another function calls this \code{page}
#' function. It could 
#' @param page_name - the name of the page to be created, or to be checked
#' @param fun_flag  - a flag set when other functions call this function. 
#' @param ... 
#'
#' @return page_instance - list()
#' @export
#'
#' @examples 
#' test_page <- page("/example)
page <- function(page_name,fun_flag=FALSE,...){

It will looksomething like snippet above.

@lo5 lo5 changed the title Requires @export for NAMESPACE to pick up the functions in ui.R Refinements to R code generator Dec 21, 2020
@lo5 lo5 added this to the 0.11 milestone Jan 19, 2021
@lo5 lo5 added feature Feature request r Related to R driver labels Jan 19, 2021
@lo5
Copy link
Member

lo5 commented Jan 19, 2021

Addressed: 0488858

@lo5 lo5 closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request r Related to R driver
Projects
None yet
Development

No branches or pull requests

2 participants