Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rmarkdowns in examples don't work #18

Closed
davidecrs opened this issue Jul 15, 2021 · 1 comment
Closed

Rmarkdowns in examples don't work #18

davidecrs opened this issue Jul 15, 2021 · 1 comment

Comments

@davidecrs
Copy link

Hi,

I cloned the repo and tried to run the examples as they are without changing them, but they don't work.

  1. In the mnist_example.Rmd for the following step
m2 <- mapper2D(distance_matrix = mnist_distances,
                filter_values = list(emb@data@data[,1], emb@data@data[,2]),
                num_intervals = c(30,30),
                percent_overlap = 35,
                num_bins_when_clustering = 10);

I get the following error:
Error in vertices_in_level[[k1]] : subscript out of bounds

  1. Regarding the vr_cycle_example.Rmd in the last line of code
(scores[order(scores$R1, scores$R0),])[1:5,]

I get the following error
Error in order(scores$R1, scores$R0) : argument 1 is not a vector

In this case seems that scores doesn't have R1

> head(scores)
                     R0    p0        q0
0610007P14Rik 1.0076786 0.323 0.5204212
0610009O20Rik 0.9974801 0.201 0.3855278
0610010F05Rik 0.7698217 0.000 0.0000000
0610010K14Rik 0.9990372 0.203 0.3884544
0610011F06Rik 0.9924835 0.132 0.2933002
0610037L13Rik 0.9924345 0.130 0.2901680

OS: Ubuntu 20.04.2 LTS
R version 4.1.0 (2021-05-18)

@govekk
Copy link

govekk commented Aug 12, 2021

The first issue is an error in a function from a different package, TDAmapper. I was able to reproduce this error when I installed TDAmapper from CRAN, rather than from the GitHub paultpearson/TDAmapper. In one of their issues, they suggest using the GitHub version since the CRAN version is out of date (paultpearson/TDAmapper#6 (comment)). I was able to fix this error by removing the CRAN version and installing the GitHub version:

remove.packages(TDAmapper)
devtools::install_github(paultpearson/TDAmapper)

And then restarting R.

The second issue was a simple fix - we updated the one_forms parameter default of rayleigh_selection() from TRUE to FALSE, but that function call in the example expects one_forms=TRUE. I have updated the example to explicitly set that parameter.

@govekk govekk closed this as completed Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants