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

add R package #53

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

add R package #53

wants to merge 6 commits into from

Conversation

munnsmunns
Copy link
Collaborator

Uncomments bmds_entry.h to restore ability to install as an R package.

@shapiromatron shapiromatron changed the title Fix to allow BMDS to insall as R package add R package Aug 18, 2024

void BMDS_ENTRY_API __stdcall runMultitumorModel(struct python_multitumor_analysis *pyAnal, struct python_multitumor_result *pyRes);

double DLgamma(double x);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@shapiromatron which functions should I add next? if you have any inputs/outputs to test with that would be great too

Copy link
Collaborator

Choose a reason for hiding this comment

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

See the attached notebook (I had to export as markdown). If we can add this, then we can run bmdscore models in R. Being able to do that effectively unlocks R as a client.
c-structs.md

Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's an updated notebook that includes all four data types in bmdscore. For now, I think focusing on continuous is the next priority, but I documented all the other thingies currently in the library.

c-structs2.md

R/dichotomous_wrappers.R Outdated Show resolved Hide resolved
@@ -0,0 +1,9 @@
test_dichotomous <- function() {
Copy link
Collaborator Author

@munnsmunns munnsmunns Sep 13, 2024

Choose a reason for hiding this comment

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

We're getting the right outputs from this!

> ToxicR::test_dichotomous()
$bmd
[1] 44.88413

$bmd_dist
  [1]     0.00000     0.00000     0.00000     0.00000    30.02733    30.60007
  [7]    31.08700    31.51878    31.90691    32.26039    32.58845    32.89301
 [13]    33.17977    33.45031    33.70602    33.95151    34.18506    34.40905
 [19]    34.62602    34.83443    35.03558    35.23136    35.42149    35.60557
 [25]    35.78479    35.96032    36.13162    36.29845    36.46161    36.62187
 [31]    36.77958    36.93393    37.08528    37.23407    37.38077    37.52547
 . . .

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is perfect! the example script is exactly what I was hoping might be possible. Nice job.

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.

2 participants