ggseqplot error

Hi,

I am trying to learn how to plot sequence data using -ggseqplot- I have read through the documentation and examples on several website. However, I can't get any of the -ggseqplot- commands to work. I continue to receive the same errors. I have posted the code below with the error message and I would appreciate any help.

Mary

ggseqiplot(actcal.seq, sortv = "from.end")
Error in dplyr::mutate():
:information_source: In argument: states = forcats::fct_na_value_to_level(.data$states, level = "Missing").
Caused by error:
! 'fct_na_value_to_level' is not an exported object from 'namespace:forcats'
Run rlang::last_trace() to see where the error occurred.
rlang::last_trace()
<error/dplyr:::mutate_error>
Error in dplyr::mutate():
:information_source: In argument: states = forcats::fct_na_value_to_level(.data$states, level = "Missing").
Caused by error:
! 'fct_na_value_to_level' is not an exported object from 'namespace:forcats'


Backtrace:

  1. └─ggseqplot::ggseqiplot(actcal.seq, sortv = "from.end")
  2. ├─base::suppressMessages(...)
  3. │ └─base::withCallingHandlers(...)
  4. ├─dplyr::rename(...)
  5. ├─dplyr::as_tibble(...)
  6. ├─dplyr::mutate(...)
  7. ├─dplyr::group_by(...)
  8. ├─dplyr::mutate(...)
  9. └─dplyr:::mutate.data.frame(...)
  10. └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
    
  11.   ├─base::withCallingHandlers(...)
    
  12.   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
    
  13.     └─mask$eval_all_mutate(quo)
    
  14.       └─dplyr (local) eval()
    

Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.

This plot was created on my end:

image

my code:

library(TraMineR)
library(ggseqplot)
data(actcal)
actcal.seq <- seqdef(actcal[, 13: 24])
ggseqiplot(actcal.seq, sortv = "from.end")

after following this guide: ggseqiplot: Sequence Index Plot in ggseqplot: Render Sequence Plots using 'ggplot2' (rdrr.io)

1 Like

Hi there,
I am the author of the package and have to admit that this is a "dependency" issue caused by a incorrect specification of the package's dependencies. I forgot to add the required version of dplyr (and other packages). I will fix this in the next release. In the meantime, you can help yourself by updating dplyr, tidyr, and ggplot2.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.