Skip to content

Error running by_split() #15

Answered by tpronk
tommygunawan asked this question in Q&A
Jul 28, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hey, thanks for your question! By default, splithalfr imports the function %>% from the dplyr package, which in turn imports it from magrittr. If your use this function inside your own code, you'll first need to import it yourself by importing dplyr or magrittr.

However, if you use it inside of the fn_score function passed to by_split, things might be a bit more complicated because the splithalfr uses multi-core processing by default. If this is the case..

  1. Could you run a little test by setting ncores = 1?
  2. Could you share your fn_score function?

Example:

split_scores <- by_split(
  df_tmt,
  df_tmt$subject,
  fn_score,
  method = "random",
  replace = TRUE,
  split_p = 1,
  replications…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tommygunawan
Comment options

@tpronk
Comment options

Answer selected by tommygunawan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants