Skip to content
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

Lazy r defs #99

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Lazy r defs #99

wants to merge 24 commits into from

Conversation

behrica
Copy link
Member

@behrica behrica commented May 7, 2024

got the simple unary / binary functions "r_xxx" working

@behrica
Copy link
Member Author

behrica commented May 7, 2024

now as well the str-md

"For the R function [str](https://www.rdocumentation.org/packages/utils/versions/3.6.1/topics/str), we capture the standard output and return the corresponding string."
(r "function(x) capture.output(str(x))") )

(defn println-captured-str[x]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this did before, so could not test it.
How is it suppoed to be used ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember precisely. Some functions print something and it would be great to have the result as a string. But it's a guess (I need to remember this topic)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example summary() prints to stdout

@behrica
Copy link
Member Author

behrica commented May 7, 2024

I think I made all "lazy", keeping full functionality.
running clj src/clojisr/v1/r.clj does not trigger initialize R any more, so namespace can be required and does not
try to connect to R.
I made tests for all functions and they keep passing.

@behrica behrica requested a review from genmeblog May 7, 2024 20:31
@genmeblog
Copy link
Member

Wow! You've made a great job! Thanks.
I'll take a look at this today.

@@ -144,7 +144,6 @@
(.close socket)
(.getLocalPort socket)))

;; symbol, string, how to process parameters (all or butlast)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment deleted by mistake

@behrica
Copy link
Member Author

behrica commented May 8, 2024

lates commit c952bed here fixes as well #96

src/clojisr/v1/r.clj Outdated Show resolved Hide resolved
@behrica
Copy link
Member Author

behrica commented May 10, 2024

Where is the code which defines
x %% y
x %/% y
%in%
?

Its mentioned in CHANGELOG, but cannot find it

added `rcolon` for consistency
@genmeblog
Copy link
Member

Where is the code which defines x %% y x %/% y %in% ?

Its mentioned in CHANGELOG, but cannot find it

I don't remember precisely, maybe it was done in codegen. I need to verify this.

@behrica behrica requested a review from genmeblog May 27, 2024 19:54
@genmeblog
Copy link
Member

I'll review this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants