R object class is coerced to function in py object using {reticulate} to create a {learnr} tutorial

Hello everyone,

I'm not able to get the correct type of an R object which I need to use in a Python object while creating a learnr tutorial in R. I attached an image where I tried to present to you a sample example and the error I got. For your information, when I executed the same chunks in an .Rmd file by removing the parts related to learnr like exercicse=TRUE, the chunks executed very well, and the type of r.a was int, not function. I can't understand why the R object class is coerced to function in py object using {reticulate}.

This is the information about the packages I'm using and the versions of R and RStudio:

  • reticulate 1.28
  • learnr 0.11.2
  • R-4.2.1
  • RStudio 2022.12.0

Any help would be appreciated!

@barret Hello,
Could you please provide me with some help on this topic? Thank you.

This topic was automatically closed 45 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.