Coder Social home page Coder Social logo

Comments (5)

vrodriguezf avatar vrodriguezf commented on May 23, 2024

Ensure that the dependencies of the arules package are loaded. as is a function from the package "methods"

from arules.

nirsisense avatar nirsisense commented on May 23, 2024

What are the dependent package I need to load?
I tried load "methods"
library("arules")
library("methods")
data <- list(
c("a","b","c"),
c("a","b"),
c("a","b","d"),
c("b","e"),
c("b","c","e"),
c("a","d","e"),
c("a","c"),
c("a","b","d"),
c("c","e"),
c("a","b","d","e")
)
trans <- as(data, "transactions")
still fails in Rscript but runs fine in RStudio

from arules.

vrodriguezf avatar vrodriguezf commented on May 23, 2024

Hmmmm the same lines of code are working for me, both in RStudio and RScript, event without loading "methods" explicitly...Do you have any other possible packages in the environment that could overwrite the definition of the as function ? Executing ?as in the command line gives you any result?

What OS and R version are you using?

Also, try to reinstall the package with install.packages("arules", dependencies=T)

from arules.

mhahsler avatar mhahsler commented on May 23, 2024

@nirsisense is correct. This has nothing to do with arules. You need to explicitly load methods when you use Rscript.

from arules.

nirsisense avatar nirsisense commented on May 23, 2024

ok, thanks. It works now

from arules.

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.