Skip to content

Remove references to geneorama #40

Description

@geneorama

I'm using my package here and there, this should be sanitized of geneorama functions. The only really important function is the shift function, which has a data.table analogue, but I wrote my version first and our versions are different. So that could be confusing if geneorama were not available.

Functions being used:

  • loadinstall_libraries - loads libraries, installs them if they're missing. This is only for convenience when testing on different machines. This can be changed to library (although we might need to add some error handling for the script that's using rgdal, which isn't installed on the development server).
  • shift - basically a lag operator. I'll just make a copy of the function in this project.
  • sourceDir - sources all the files in a directory, I'll just make a copy of this function in the project
  • naSummary - Summarizes NA and unique values in a dataset - I can just make a copy of this function
  • Other convenience functions like clipper and the one that writes temp files can be omitted completely.
  • I think there might be some other functions in geneorama which are already copied into the project, like the ones that translate between xy coordinates and lat / lon

The shift function:

shift <- function (x, offset = 1, pad = NA) {
    r <- (1 + offset):(length(x) + offset)
    r[r < 1] <- NA
    ans <- x[r]
    ans[is.na(ans)] <- pad
    return(ans)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions