Code Monkey home page Code Monkey logo

roxygenready's People

Contributors

thezetner avatar vertesy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

roxygenready's Issues

rr_extract_all_functions_from_a_script expects `<-`

Although I know it's not the coding standard, I use = for assignment in R, and this includes function defintion. I see that rr_extract_all_functions_from_a_script is grepping as follows:
patt = " *<- *function *\\(.+"
index = grep(patt, ScriptAsStringsPerLine, perl = T)

This results in RoxygenReady not detecting any functions in my script.

could not find function "as.named.vector"

This is a useful premise for a package. Running on a sample script I find:

Error in rr_extract_default_args(funnames[i]) :
could not find function "as.named.vector"

Looking in another repo I see: https://github.com/vertesy/TheCorvinas/blob/master/R/CodeAndRoll.R#L186

as.named.vector <- function(df_col, WhichDimNames = 1) { # Convert a dataframe column or row into a vector, keeping the corresponding dimension name.
    # use RowNames: WhichDimNames = 1 , 2: use ColNames
    # !!! might require drop=F in subsetting!!! eg: df_col[,3, drop=F]
    # df_col[which(unlist(lapply(df_col, is.null)))] = "NULL" # replace NULLs - they would fall out of vectors - DOES not work yet
    namez = dimnames(df_col)[[WhichDimNames]]
    if (is.list(df_col) & !is.data.frame(df_col)) {namez = names(df_col)}
    vecc = as.vector(unlist (df_col))
    names (vecc)= namez
    return (vecc)
}

Sourcing the above function allows the code to run without error.

object ' FUN' not found

Constantly getting Error in FUN(X[[i]], ...) : object ' FUN' not found in almost all files.

Small updates

  • Add a header, "Created by RR",
  • Search Stack overflow / Set up an alert for keyword
  • Webpage: Install and usage / workflow explained,
  • Webpage: "from" missing
  • Release 1.0.1

wrong regex

in rr_extract_all_functions_from_a_script the regex needs to be:
patt = " *(<-|=) *function *\\(.+"
instead of:
patt = " *<-|= *function *\\(.+"

or you will grep other (non-function) lines.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.