GithubHelp home page GithubHelp logo

big.char's Introduction

big.char

Extends bigmemory's big.matrix to support big vectors of character strings. Current package build status via use of Travis CI:

Description

This package extends bigmemory's big.matrix objects to support big vectors of character strings. The only constraint is the user-specified maximum character length which must be satisfied for every string in the vector. Shorter strings are padded with NAs, consuming (and wasting) space, but this is unavoidable given the use of memory-mapped files.

NOTE: under development!

This package is very much under development. The basic functionality seems fairly solid. The implementation may not be as efficient as it could be. Not all usage errors may be trapped or handled in a friendly or appropriate manner. For example, if a big.char vector, x has length 5, then x[6] generates an error (this would not be the case with a regular vector of strings). Please feel free to email me with problems, questions, or requests.

Known issues to be resolved:

  • index recycling (bug in bigmemory, fix there)
  • indices out of bounds (needs fixing in big.char for consistency with R's default behavior/behaviour)

Getting Started

The next to last command triggers a warning because the string is truncated to three (3) characters.


> require(devtools)
> install_github('big.char', 'jayemerson')
> library(big.char)
>
> x <- big.char(5, 3, init="ABC")
> x[]
[1] "ABC" "ABC" "ABC" "ABC" "ABC"
> x[1] <- ""
> x[-1] <- c(NA, "*", "--", "ABCD")
Warning message:
In `[<-`(`*tmp*`, -1, value = c(NA, "*", "--", "DEFG")) :
Long string(s) truncated to maxchar characters
> x[]
[1] ""    NA    "*"   "--"  "DEF"

License

The big.char package is licensed under LGPL-3.

Hey Jay!

After creating the public repository on GitHib, essentially empty with only README.md, I cloned to my laptop:

git clone https://github.com/jayemerson/big.char.git

I then moved the package contents into the local big.char directory, at which point the following workflow appears sufficient for my own purposes:


git status
git commit -am "Short commit message here"
git push origin

big.char's People

Contributors

jayemerson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

digofr shaeselix

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.