R Programming: Object of Type 'Closure' is Not Subsettable

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • The error message "Object of Type 'Closure' is Not Subsettable" has presumably troubled many R users, not only beginners, and can be considered one of the less helpful messages. Here we'll answer two questions:
    - How can this error come about (and how to solve it, of course)?
    - What is a closure, anyway?
    We'll see two ways how this error may be triggered:
    1. Accidentally using [] instead of ()
    2. Accidentally accessing a non-existing object that happens to be a function
    In the video, I mentioned Hadley Wickham's "Advanced R" book where you can find out more about environments and namespaces:
    adv-r.hadley.nz/
    I also mentioned Jenny Bryan's great talk "Object of type ‘closure’ is not subsettable":
    • Jenny Bryan | Object o...
    Contact me, e. g. to discuss (online) R workshops / trainings / webinars:
    / wolfriepl
    Facebook: / statistikdresden
    Twitter: / statistikindd
    statistik-dres...
    R Workshops: statistik-dres...
    Blog (German, translate option): statistik-dres...
    Playlist: Music chart history
    • Music Chart History

Комментарии • 4

  • @adamatomic41
    @adamatomic41 2 года назад +1

    Thank you! I looked all over to try to fix this problem and this is the only thing that helped.

  • @RochelleMphetlhe-bs6hk
    @RochelleMphetlhe-bs6hk Год назад

    the second example helped with my problems, thank you so much

  • @colbykresge960
    @colbykresge960 2 года назад

    install.packages("foieGras", depedencies = c("Imports","LinkingTo","Suggests"))
    install.packages("TMB")
    library(glmmTMB)
    library(foieGras)
    library(foieGras)
    library(readr)
    HP

    • @StatistikinDD
      @StatistikinDD  2 года назад +1

      Sorry, I have no experience using these packages and this fit function.