Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Unable to reproduce example in JOSS paper #54

Closed
dmbates opened this issue Sep 28, 2020 · 1 comment
Closed

Unable to reproduce example in JOSS paper #54

dmbates opened this issue Sep 28, 2020 · 1 comment

Comments

@dmbates
Copy link

dmbates commented Sep 28, 2020

I am reviewing https://github.com/openjournals/joss-reviews/ #2598 and I am unable to reproduce the first example in the paper

> library(set6)

-----------------------------
	set6 v0.1.8

Get started:	?set6
Changelog:	set6News()
-----------------------------

> a <- Set$new(1,2,3)
> a
{1, 2, 3} 
> a$contains(1)
[1] TRUE
> a$contains(pi)
[1] FALSE
> a$contains(1, pi, "a")
[1] TRUE
> a$contains(1, "a")
Error in if (all) { : argument is not interpretable as logical

Have I misunderstood the example? (My R programming is a bit rusty so my apologies if I misunderstood)

If it matters this is on Ubuntu 20.04 with
Package: r-base-core
Version: 4.0.2-1.2004.0

@RaphaelS1
Copy link
Collaborator

Sorry about this, this is a typo in the paper, it should read:

a <- Set$new(1, 2, 3)
a$contains(c(1, "a"))

So in your examples it should be

a <- Set$new(1,2,3)
a
a$contains(1)
a$contains(pi)
a$contains(c(1, pi, "a"))
a$contains(c(1, "a"))

or

a$contains(list(1, pi, "a"))
a$contains(list(1, "a"))

@dmbates dmbates closed this as completed Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants