Skip to content

gRbase::stepwise function makes R session abort #10

Open
@AlessioBoetti

Description

@AlessioBoetti

Hi!
I'm using RStudio (RStudio 2021.09.1+372 "Ghost Orchid" Release for Windows, R version 4.1.2) on Windows 10 x64.

I trying to create an Undirected Graph from a dataset:

library(gRbase)
library(gRim)
library(gRain)
data(BodyFat)
BodyFat <- BodyFat[-c(31,42,48,76,86,96,159,169,175,182,206),]
BodyFat$Age <- sqrt(BodyFat$Age)
BodyFat$Weight <- sqrt(BodyFat$Weight)
names(BodyFat)[names(BodyFat) == 'BodyFat'] <- 'BodyFatPerc'
gRbodyfat <- BodyFat[,2:15]
graph.MyGraph <- cmod(~.^., data = gRbodyfat)
AIC.MyGraph <- gRbase::stepwise(graph.MyGraph)

I'm still exploring RStudio and graphical models, so I run these lines from the console, one by one. When I run the last line of code, R session aborts and I get the following pop-up message:

Screenshot (285)

I've also tried the following lines of code (I changed the last line):

library(gRbase)
library(gRim)
library(gRain)
data(BodyFat)
BodyFat <- BodyFat[-c(31,42,48,76,86,96,159,169,175,182,206),]
BodyFat$Age <- sqrt(BodyFat$Age)
BodyFat$Weight <- sqrt(BodyFat$Weight)
names(BodyFat)[names(BodyFat) == 'BodyFat'] <- 'BodyFatPerc'
gRbodyfat <- BodyFat[,2:15]
graph.MyGraph <- cmod(~.^., data = gRbodyfat)    
AIC.MyGraph <- stepwise(graph.MyGraph)

but I get the same problem. I tried six or seven times running those lines of code, R aborted everytime.

My gRbase, gRim, gRain, Rgraphviz and RBGL libraries are in the home folder:
C:/Users/MyUser/Documents/R/win-library/4.1

I've tried doing this:

  • Reinstalling gRbase, gRim, gRain, Rgraphviz, RBGL, graph, BiocManager, BiocVersion, BiocGenerics, Rcpp, RcppArmadillo, RcppEigen libraries. I've tried doing this after restarting the session and clearing the workspace and even after reinstalling RStudio and R (both last versions)
  • Installing Rtools (last version) (as explained here) and reinstalling all the libraries above
  • Reinstalling R, Rtools and Rstudio (last versions) and reinstalling all the libraries above
  • Executing RStudio as Administrator and reinstalling all the libraries above
  • Changing computer (Windows 10 x64) and installing R, Rtools, RStudio, and all the libraries above as Administrator

They didn't work. Don't know why R session aborts.

When installing libraries I followed these instructions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions