Giter Site home page Giter Site logo

memisc with data.table about memisc HOT 1 CLOSED

melff avatar melff commented on June 20, 2024
memisc with data.table

from memisc.

Comments (1)

melff avatar melff commented on June 20, 2024

You are using annotation etc. in a way they are not intended:

  • annotation etc. are supposed only to work with objects of class "item" which are expected to be in a "data.set" object rather than a "data.frame" or "data.table" object.
  • There is no support for "data.table" objects yet.

To get what you apparently want, try:

library(memisc)
library(data.table)

data(mtcars)
## This is necessary to get things working ...
mtcars <- as.data.set(mtcars)

mtcars <- within(mtcars, {

  description(vs) <- "whatever"
  description(am) <- "something unclear"
  description(carb) <- "something different"
  wording(vs) <- "this is going to be a long comment"

  labels(vs) <- c(
    "many" = 1,
    "not so many" = 0
  )

  labels(carb) <- c(
    "one" = 1,
    "two" = 2,
    "three" = 3
  )

  missing.values(carb) <- c(4,6, 8)
})

codebook(mtcars) 
annotation(mtcars) <- "my long story"
annotation(mtcars)
mtcars

## To get a data frame, use
# as.data.frame(mtcars)

from memisc.

Related Issues (20)

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.