Skip to content

Refactor Example Data: R-CMD check error #118

Description

@the-mayer

An R-CMD check error occurs when running this example code for reverseOperonSeq():

❯ checking examples ... [14s/15s] ERROR
  Running examples in ‘MolEvolvR-Ex.R’ failed
  The error most likely occurred in:
  
  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: reverseOperonSeq
  > ### Title: reverseOperon: Reverse the Direction of Operons in Genomic
  > ###   ContextSeq
  > ### Aliases: reverseOperonSeq
  > 
  > ### ** Examples
  > 
  > # Example genomic context data frame
  > prot <- data.frame(GenContext = c("A>B", "C<D", "E=F*G", "H>I"))
  > reversed_prot <- reverseOperonSeq(prot)
  Error in ge[[x]] : subscript out of bounds
  Calls: reverseOperonSeq -> lapply -> FUN -> straightenOperonSeq
  Execution halted

Using the example data defined in prot the error occurs during the lapply operation @line 137 as ge has length 0 due to the previous subset operation.

Originally posted by @the-mayer in #97 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions