> > I am working on it, but I have a question concerning strings and lists > in elisp. > > In the function org-babel-execute:R it says: > > ,---- > | (inside > | (list (org-babel-expand-body:R body params graphics-file))) > `---- > > I now want to convert "inside" to a comma separated string. I am doing > now the following: > > ,---- > | (replace-regexp-in-string "\n" ", " (format "%s" inside)) > `---- > > but this does not look elegant to me, as I am converting inside to a > string and then do a replace. There is the function mapconcat, but I > don't get it to work: > > ,---- > | (replace-regexp-in-string "\n" ", " (format "%s" inside)) > | "( createOrgVariablesEnvironment(), plot(1))" > | > | (mapconcat 'identity inside ", ") > | " createOrgVariablesEnvironment() > | plot(1)" > `---- > > What am I missing? >
The following should work. (mapconcat #'identity inside ", ") If that doesn't give the expected result, maybe share an example value of inside, with the expected results. Best, Eric > > Thanks, > > Rainer > >> >> As it needs to be sourced for each R process once, the right place would >> be in org-babel-R-initiate-session - correct? >> >> What would be the best place to put these R files? >> >>> One lesson I've certainly learned from the Org-mode mailing list is >>> that you can't anticipate all of the ways that your code will be used, >>> so up-front customizability generally pays off. >> >> OK - point taken - and I am definitely one of those users who thinks >> about unusual usages of certain features. >> >> Cheers, >> >> Rainer >> >>> >>> Thanks, >>> Eric >>> >>>> >>>> Thanks >>>> >>>> Rainer -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D