Recent content by jamesmartinn

  1. J

    Trouble connecting to R

    Sounds like a nightmare. Maybe renv could help here?
  2. J

    How do I check for normality?

    No problem. The example in the link that demonstrates the Welch T-Test starts from scratch (i.e. sample raw data are first created, then used, step-by-step). Another good resource is here: This should get you started...
  3. J

    How do I check for normality?

    I'm not familiar with either, but will admit I was curious so I looked them up. It seems Jamovi is built on R, and you are able to execute R code. Here is a guide that show's how the Welch-correction version of the t-test can be ran in R (one command assuming your data is imported)...
  4. J

    Long to wide format... how is it again?

    Just posting another solution @spunky If you're working in the tidyverse, tidyr has some relatively recent developments to help with these tasks, namely through pivot_wider, pivot_longer: # data x <- rnorm(100) g1 <- rep(1:5, each=20) id <- rep(1:20, times=5) df <- data.frame(x,id,g1) #...
  5. J

    Running simulations in R

    I echo @Dason's remarks about not really needing any specific packages to do simulations in R. I understand the pain points of PROC IML, but R overcomes this kind of by default. I really prefer building simulations from the ground up as it also provides you a chance to think through (or...
  6. J

    How to adjust specific tabletext font to bold?

    No problem, glad it could help. I have the "base" code that powers the shiny app located here: The example should be completely reproducible.
  7. J

    How to adjust specific tabletext font to bold?

    It's not clear if your data is a result of a meta-analysis? If your data is from a logistic regression or cox model, I have an app here that might help you: The app has data pre-loaded in it already as an example. Goto the review tab and click proceed to...
  8. J

    The item response theory - which method to choose

    Hi, The ltm package can fit the graded response model - I used this a long time ago for this very purpose. You might want to also check out the mirt package, which can do uni and multidimensional irt.
  9. J

    Reg ex Question

    Thank you for the quick reply, Dason! You have no idea how much you've simplified my day... (after a very long and exhausting work week)
  10. J

    Reg ex Question

    Hi! I have a string, that follows a predictable format, and I'm looking to replace certain characters in it. Please see below. Any help is appreciated. > have <- "_a _a_1 _a_2 _a_3" > have [1] "_a _a_1 _a_2 _a_3" What I need to do is remove the initial underscore in each space delimited...
  11. J

    Today I Learned: ____

    I'm currently going through Text Mining with R: A Tidy Approach by Robinson and Silge. In this book they mention the {sentimentR} package, which is useful for analyzing sentiments on whole sentences (over words, which I've been doing). I looked into this a bit and I saw it was authored by...
  12. J

    Today I Learned: ____

    TIL i use shiny modules. I have a dashboard that has 4 to 5 pages (representing subgroups), and on each page the elements (graphs, text, tables) are all the same. Made for a good use case. To slightly complicate the matter, I also have a reactive data set powering all the pages (built off a...
  13. J

    Set operations/Anti_join

    Hi all, I'm trying to accomplish a set of tasks that involve set operations/joins. I'm able to solve a bit of this using packages from the Tidyverse. I can't figure out if there's a nicer way to do the last task, please below. The first task is self-explanatory. I have 3 vectors, and I'm...
  14. J

    proc traj

    No. If you've specified the model and interpretted the output correctly, and there's no evidence of unobserved heterogenity in response, why would you think trying to force it would be a good idea?
  15. J

    Logistic regression using Lasso

    I think HPGENSELECT will accomplish LASSO for Logistic Regression (and other GLMz)