mlcollyer / RRPP

RRPP: An R package for fitting linear models to high-dimensional data using residual randomization
https://mlcollyer.github.io/RRPP/
4 stars 1 forks source link

Error when "print.progress = T" in trajectory.analysis #8

Closed aConar closed 1 year ago

aConar commented 1 year ago

Dear Michael, I noticed that when print.progress is se to True in trajectory.analysis the following error show up: Error in setTxtProgressBar(pb, step) : object 'pb' not found Setting "print.progress = F" works fine. I'm running Linux, maybe a missing library? Another question related to trajectory.analysis. Playing with the example data Pupfish if I run: plot(gm.prcomp(Pupfish$coords)) I get a PCA plot where the first PC has a 43% of total variance. But when plotting the trajectory.analysis of same data:

TP <- plot(TA, pch = as.numeric(Pupfish$Pop) + 20, bg = as.numeric(Pupfish$Sex), cex = 0.7, col = "gray")
add.trajectories(TP, traj.pch = c(21, 22), start.bg = 1, end.bg = 2)

The 1st PC shows 62% of total variance. Is that correct? Thanks in advance. Ale

mlcollyer commented 1 year ago

Dear Ale,

Thanks for the alert! I fixed a bug (actually in pairwise) that had an illogical print.progress condition. This fix has been pushed to github.

Regarding your second question, the PCAs are performed on different values, as made clear in the axes of the plot in the trajectory plot (fitted values, not data), as well as the help file.

Best, Mike

On Apr 5, 2023, at 9:54 AM, aConar @.***> wrote:

Dear Michael, I noticed that when print.progress is se to True in trajectory.analysis the following error show up: Error in setTxtProgressBar(pb, step) : object 'pb' not found Setting "print.progress = F" works fine. I'm running Linux, maybe a missing library? Another question related to trajectory.analysis. Playing with the example data Pupfish if I run: plot(gm.prcomp(Pupfish$coords)) I get a PCA plot where the first PC has a 43% of total variance. But when plotting the trajectory.analysis of same data:

TP <- plot(TA, pch = as.numeric(Pupfish$Pop) + 20, bg = as.numeric(Pupfish$Sex), cex = 0.7, col = "gray") add.trajectories(TP, traj.pch = c(21, 22), start.bg = 1, end.bg = 2) The 1st PC shows 62% of total variance. Is that correct? Thanks in advance. Ale

— Reply to this email directly, view it on GitHub https://github.com/mlcollyer/RRPP/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUNU4X5JZ5AUSJJSCHG5IDW7V2SPANCNFSM6AAAAAAWUDR2IA. You are receiving this because you are subscribed to this thread.