-
Notifications
You must be signed in to change notification settings - Fork 1
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
Suggestion: Option to not "closeAllConnections()" #1
Comments
Dear Gregor,
Thank you for reporting this. I can't remember at the moment why I had
put that closeAllConnections command in the code (it's also in my other
packages rbacon and rplum). I don't use RStudio either so it doesn't
have to do with that.
I'll have a look at the code when I have time (hopefully soon) and then
probably remove that closeAllConnections() command.
Cheers,
Maarten
On 13/04/2021 16:24, Gregor Pfalz wrote:
*This message is from an external sender. Please take care when
responding, clicking links or opening attachments.*
Dear Maarten,
I recently ran your package in a jupyter notebook with R kernel. My
code was fairly simple with this dataset (PG1972.txt
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMaarten14C%2Fclam%2Ffiles%2F6304733%2FPG1972.txt&data=04%7C01%7Cmaarten.blaauw%40qub.ac.uk%7C9ae7c28838c64263ccdf08d8fe904e9f%7Ceaab77eab4a549e3a1e8d6dd23a1f286%7C0%7C0%7C637539243738850289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=urXjPgI7ZrUK8nF8j0BHqsTRvuX%2FlumH%2Fp8RHIjExDk%3D&reserved=0>
- had to convert the .csv to .txt to upload it to this issue):
|setwd('D:/HEIBRiDS/Data/clam_runs') library('clam')
clam(core='PG1972', coredir= 'D:/HEIBRiDS/Data/clam_runs', type = 1,
its = 10000) |
But it produced an error:
|The run's files will be put in this folder:
D:\HEIBRiDS\Data\clam_runs/PG1972 Calibrating dates... extrapolating
beyond dated levels, dangerous! Interpolating, sampling..... Error in
isOpen(con): invalid connection |
I think this has to do with the following line:
https://github.com/Maarten14C/clam/blob/0851eaba7998288f960d38c1fbd1198d7abe7396/R/clam.R#L412
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMaarten14C%2Fclam%2Fblob%2F0851eaba7998288f960d38c1fbd1198d7abe7396%2FR%2Fclam.R%23L412&data=04%7C01%7Cmaarten.blaauw%40qub.ac.uk%7C9ae7c28838c64263ccdf08d8fe904e9f%7Ceaab77eab4a549e3a1e8d6dd23a1f286%7C0%7C0%7C637539243738850289%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2%2FRq4S8IeTNln%2BgxGi9%2BiZ9EbHgaU2TvKrZ%2BFK0BINo%3D&reserved=0>
I tested my theory by using the |trace('clam', edit = TRUE)| command
and comment line 412 out. Now, I was able to receive an output:
Screenshot 2021-04-13 171414.pdf
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMaarten14C%2Fclam%2Ffiles%2F6304773%2FScreenshot.2021-04-13.171414.pdf&data=04%7C01%7Cmaarten.blaauw%40qub.ac.uk%7C9ae7c28838c64263ccdf08d8fe904e9f%7Ceaab77eab4a549e3a1e8d6dd23a1f286%7C0%7C0%7C637539243738860284%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IUfyS4fmnLoQon%2F%2FWXC3QXx5xZ253yJD1Afs32tfxO0%3D&reserved=0>
Would it be possible for you to implement an option to make the
statement "closeAllConnections()" optional? It would be helpful for
users, who don't use RStudio, as this seems to interfere with the
connection from the kernel and the clam package.
All the best,
Gregor
P.S. here's my sessionInfo() for reproducibility:
|R version 4.0.4 (2021-02-15) Platform: x86_64-w64-mingw32/x64
(64-bit) Running under: Windows 10 x64 (build 19042) Matrix products:
default locale: [1] LC_COLLATE=German_Germany.1252
LC_CTYPE=German_Germany.1252 [3] LC_MONETARY=German_Germany.1252
LC_NUMERIC=C [5] LC_TIME=German_Germany.1252 attached base packages:
[1] stats graphics grDevices utils datasets methods base other
attached packages: [1] clam_2.3.7 loaded via a namespace (and not
attached): [1] fansi_0.4.2 digest_0.6.27 utf8_1.2.1 crayon_1.4.1 [5]
IRdisplay_0.7.0 repr_1.1.0 lifecycle_1.0.0 jsonlite_1.7.2 [9]
evaluate_0.14 pillar_1.5.1 rlang_0.4.10 uuid_0.1-4 [13] IntCal_0.1.3
ellipsis_0.3.1 IRkernel_1.1.1 tools_4.0.4 [17] compiler_4.0.4
base64enc_0.1-3 pbdZMQ_0.3-3.1 htmltools_0.5.0 |
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMaarten14C%2Fclam%2Fissues%2F1&data=04%7C01%7Cmaarten.blaauw%40qub.ac.uk%7C9ae7c28838c64263ccdf08d8fe904e9f%7Ceaab77eab4a549e3a1e8d6dd23a1f286%7C0%7C0%7C637539243738870276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MkbeqzGTKvdM99tcXjapn1kfDzc%2B7bfAnSG0vEG4QYw%3D&reserved=0>,
or unsubscribe
<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACZNBI3W5TUOZHRDNOYEBEDTIRO4NANCNFSM423SCIRQ&data=04%7C01%7Cmaarten.blaauw%40qub.ac.uk%7C9ae7c28838c64263ccdf08d8fe904e9f%7Ceaab77eab4a549e3a1e8d6dd23a1f286%7C0%7C0%7C637539243738870276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LdZlAePHxKjHJnRpfIwb5qEulMcOgLvEE%2Fj1Ezdz%2BfU%3D&reserved=0>.
--
| Dr Maarten Blaauw (Reader)
|
| Archaeology and Palaeoecology
| School of Natural and Built Environment
| Queen's University Belfast, UK
|
| www http://www.qub.ac.uk/chrono/blaauw
| tel +44 (0)28 9097 3895
|
Gregor, I've updated the code - does it work as expected now? Cheers, Maarten |
Hi Maarten, Thank you so much for the swift answer and quick fix! Cheers, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Maarten,
I recently ran your package in a jupyter notebook with R kernel. My code was fairly simple with this dataset (PG1972.txt - had to convert the .csv to .txt to upload it to this issue):
But it produced an error:
I think this has to do with the following line:
clam/R/clam.R
Line 412 in 0851eab
I tested my theory by using the
trace('clam', edit = TRUE)
command and comment line 412 out. Now, I was able to receive an output: Screenshot 2021-04-13 171414.pdfWould it be possible for you to implement an option to make the statement "closeAllConnections()" optional? It would be helpful for users, who don't use RStudio, as this seems to interfere with the connection from the kernel and the clam package.
All the best,
Gregor
P.S. here's my sessionInfo() for reproducibility:
The text was updated successfully, but these errors were encountered: