Skip to content

Commit 9eedf94

Browse files
committed
Missed one bit of unstaged code
1 parent c4d652b commit 9eedf94

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ By contributing to this project, you agree to abide by its terms.
9292

9393
### Clone
9494

95-
First clone the repository:
95+
First clone the repository and step into the directory:
9696

9797
```
9898
git clone https://github.com/HighlanderLab/RcppTskit.git
99+
cd RcppTskit
99100
```
100101

101102
### Pre-commit install

RcppTskit/R/RcppTskit.R

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,18 @@ ts_r_to_py_ptr <- function(ts, tskit_module = get_tskit_py(), cleanup = TRUE) {
232232
#
233233
# # Use the tskit Python API to work with a tree sequence (via reticulate)
234234
# tskit <- get_tskit_py()
235-
# ts_py <- tskit$load(ts_file)
236-
# is(ts_py)
237-
# ts_py$num_samples # 160
238-
# ts2_py <- ts_py$simplify(samples = c(0L, 1L, 2L, 3L))
239-
# ts2_py$num_samples # 4
235+
# if (check_tskit_py(tskit)) {
236+
# ts_py <- tskit$load(ts_file)
237+
# is(ts_py)
238+
# ts_py$num_samples # 160
239+
# ts2_py <- ts_py$simplify(samples = c(0L, 1L, 2L, 3L))
240+
# ts2_py$num_samples # 4
240241
#
241-
# # Transfer the tree sequence to R and use RcppTskit
242-
# ts2_ptr_r <- RcppTskit:::ts_py_to_r_ptr(ts2_py)
243-
# is(ts2_ptr_r)
244-
# RcppTskit:::ts_num_samples_ptr(ts2_ptr_r) # 4
242+
# # Transfer the tree sequence to R and use RcppTskit
243+
# ts2_ptr_r <- RcppTskit:::ts_py_to_r_ptr(ts2_py)
244+
# is(ts2_ptr_r)
245+
# RcppTskit:::ts_num_samples_ptr(ts2_ptr_r) # 4
246+
# }
245247
ts_py_to_r_ptr <- function(ts, cleanup = TRUE) {
246248
if (!reticulate::is_py_object(ts)) {
247249
stop("ts must be a reticulate Python object!")

0 commit comments

Comments
 (0)