-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to view R dired environment for package development #1279
Comments
Hi @mtvincen Docstring of Visiting the source of
Looking at the source code of
We can see that this function sends the command The value of
Therefore, ESS R Dired list objects in the global environment, a feature that is I hope this answers your question, at least partially. Implementing such a |
@maxecharel thanks for the follow up. Would you be able to go through the ESS code and determine in which environment the variables from an R script in package mode are being stored? I've attempted to track this down but have been unsuccessful. I believe they are being archived in some way where they don't show up in the global environment, but not exactly sure how to get access to that information. Even if you don't eventually add it to the ess-rdired functionality it would allow me to run or create my own function to print out the information that I am looking for. Thanks |
Hi, just to be sure that there is no misunderstanding: I am not an ESS maintainer, so basically the maximum I could do with my limited abilities would be to try to reshape the source of R Dired and submit a PR. Maybe at some point I will try to have a look at it, but cannot promise anything ;) I think that your question is now more a R question than an ESS one. To the best of my knowledge, ESS does not force any package environment. Such environment is 'spontaneously' created by the inferior process when 'loading' the package. When you're working on your package (let's call it
I hope it answers your question. |
I completely understand you're a volunteer with some knowledge of lisp and the package. I don't necessarily expect anything to change any time soon, as it's probably not a priority issue for most people. I've tried the R function option that you have listed. However, this only seems to list out the functions that are exported by the package. It doesn't include any of the variables that are created when you run individual lines from within a script. Looking at the ESS documentation (page 48: 10.3 Namedspace Environment) I found the following:
So it appears that the variables are sent to the namespace:mypkg but these are not viewable through the ls command because they are not searchable through the package:mypkg environment (i.e., not visible objects). I'm not entirely sure what minibuffer the package documentation is referring to though, so there might be some way to see this information that I'm not familiar with. I was thinking it might have something to do with an Rdired buffer, hence the original question. |
Thanks for the info :) What about
? Possibly with the argument |
When using ESS to test package development the variables are written to a specific namespace for that package. I have been attempting to view the namespace that is created for the development package through the M-x ess-rdired while in the buffer that is creating the variables in the package namespace. However, I am only ever able to get the global environment. Is there a way to change the environment that R dired is displayed? Any help and increased documentation about this would be greatly appreciated!
The text was updated successfully, but these errors were encountered: