AdrieanKhisbe
AdrieanKhisbe

Reputation: 4058

Error ploting sequences in TraMineR R

Just starting to experiment TraMiner, after having read the (very good) User Guide

I managed to create the sequences from my data, but as I'm trying to plot I got the following errors:

> seqiplot(my.data$sequences, title="My first sequences", withlegend = TRUE)
Error in do.call(plot, args = plist) : 
'what' must be a string or a function

Where does this come from and what can I do about it?

Upvotes: 2

Views: 259

Answers (2)

non-numeric_argument
non-numeric_argument

Reputation: 658

I guess the error shows up because you restricted your sequence state object to the single variable my.data$sequences. Have you tried my.data instead?

Upvotes: 0

agstudy
agstudy

Reputation: 121578

I think you get an error because you override the plot function. This reproduce the error:

plot <- 1
do.call(plot,list(0))
Error in do.call(plot, list(0)) : 
  'what' must be a character string or a function

This should ork:

 rm(plot)
 seqiplot(my.data$sequences, title="My first sequences", withlegend = TRUE)

Upvotes: 3

Related Questions