Giter Site home page Giter Site logo

vspinu / unnest Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 182 KB

Very fast spreading and stacking of nested data structures into R data.frames

Home Page: https://github.com/vspinu/unnest

Emacs Lisp 0.35% R 45.71% C++ 52.70% C 0.55% Makefile 0.69%
stacking flattening flattened-json flattened-data unnesting data-frame hierarchical-data r

unnest's Introduction

R build status

Description

unnest is a zero-dependency R package for a very fast single-copy and single-pass unnesting of hierarchical data structures.

unnest(..) function takes a nested list as an input (JSON, XML etc.) and produces a data.frame according to an unnesting spec.

Installation

install.packages("unnest")
# or
devtools::install_github("vspinu/unnest")

unnest's People

Contributors

olivroy avatar vspinu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

olivroy

unnest's Issues

`id` is not generated with atomic stacking

unnest(list(a = 1:3, b = 10:14), s(stack = "ix", as = "point", s(stack = "id")))
  ix point
1  a     1
2  a     2
3  a     3
4  b    10
5  b    11
6  b    12
7  b    13
8  b    14
> unnest(list(a = as.list(1:3), b = as.list(10:14)), s(stack = "ix", as = "point", s(stack = "id")))
  ix point point.id
1  a     1        1
2  a     2        2
3  a     3        3
4  b    10        1
5  b    11        2
6  b    12        3
7  b    13        4
8  b    14        5

Release v0.0.2 to CRAN.

Prepare for the release:

  • Fix all milestone issues
  • devtools::check()
  • devtools::check_win_devel()
  • devtools::check_win_release()
  • rhub::check_for_cran()
  • rhub::check_for_cran(check_args = c('--no-stop-on-test-error'), platforms = 'solaris-x86-patched')
  • revdepcheck::revdep_check(num_workers = 8)
  • Polish NEWS
  • Polish pkgdown reference index
  • Update dependencies
  • Check revdeps
  • Email reverse dependencies not to use it

Submit to CRAN:

  • Change version in DESCRIPTION and NEWS.md (no-commit!)
  • Update cran-comments.md
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted!!!!
  • usethis::use_github_release()
  • usethis::use_dev_version()

Stacking of empty vectors produces NAs

Browse[2]> unnest(list(a = 1:3, b = numeric()), s(stack = "ix", as = "point", s(stack = "id")))
  ix point
1  a     1
2  a     2
3  a     3
4  b    NA
Browse[2]> unnest(list(a = as.list(1:3), b = list()), s(stack = "ix", as = "point", s(stack = "id")))
  ix point point.id
1  a     1        1
2  a     2        2
3  a     3        3
4  b    NA       NA
Browse[2]> 

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.