Re: [R] tidying up
Hi Avi, I thought about your question over the past few days. A new email list may help, but I doubt the help will suffice to solve the problem of forming emails as the existing list prefers. Here is where I see the source of the problem with using R by way of getting questions answers. https://cran.r-project.org/doc/manuals/r-release/R-intro.html This writing is not an introductory learning piece. This work needs to be restructured and expanded. It is evident another author would need to be found who has the writing skills to accomplish the necessary improvements. *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 2/27/22 16:59, Avi Gross via R-help wrote: Indeed, Jim, the hopeful purpose of interactions here is to help people without doing the job for them. As you note, sometimes it is help in getting them to formulate what they are trying to do and maybe see the resolution on their own, or give enough info that others can troubleshoot. I have dealt with people on and off forums like this who know very little and have done some rudimentary search and found something they hope is helpful and then get stuck. Some have no actual interest in learning R or Python or anything and see it as a one-time thing. For them, any sustained interaction is just frustrating. Others may want a tutor, albeit mahy of us here are not willing or able to provide endless hours to volunteer. And some, may be better off spending the money to hire someone and I assume there are places they can be directed. -Original Message- From: Jim Lemon To: Avi Gross Cc: r-help@r-project.org Sent: Sun, Feb 27, 2022 4:52 pm Subject: Re: [R] tidying up Hi Avi, I just sent in an answer to a very simple question. In many cases it seems to me that the real problem isn't apparent from the request. ektaraK appears to have almost no experience with R (sorry if I'm wrong). A person in this position may sort of know what they want to do but do not know how to ask the question. What's a reproducible example? So I often submit really dumb looking answers that show the person how to ask the question. If I'm successful, the OP learns how to do some basic operation, but also learns how to ask the next question. Until they get there, most responses just give them a typing exercise. Jim On Mon, Feb 28, 2022 at 6:35 AM Avi Gross via R-help wrote: This mailing list seems to steadily get messages that some see as not relevant to this forum. In particular, some see it as wrong to bring up some things here and keep reminding people of some ground rules. So I want to know, briefly, if it is reasonable to ask a person with a question or problem to reproduce their problem another way. If using RSTUDIO or one of many IDE, can they run the code on a naked R interpreter by sourcing the file or copying it in or typing it anew, or perhaps using IDLE which comes by default with many installations of R? If using a library (which I like so I am not really in agreement about the unsuitability) like the tidyverse which is free and available to all even if loosely associated with the RSTUDIO folks and that can be run on any version of R that I am aware of, then some questions may still be fair if they are really about more general R issues as much of the rest of the code may be base R and may be the cause of whatever issue is being reported. And, some simple requests like pointing out a missing comma, ... I have stated my thought before and it boils down to the reality that there are some things about earlier versions of R that were far from perfect or complete and a little healthy competition is not a bad thing and may help base R evolve. Not everything in the tidyverse is better and it keeps evolving and deprecating older features, but it cannot really be ignored any longer. If you apply for a job at some company as something of an R expert, you may well be asked by all kinds of people about their programs that use the tidyverse for help or to help them solve a problem. You don't have to like it, but if you cannot read it, you no longer are really qualified in many places. Ask yourself if a language like R was created from scratch, what graphics might be built into the base distribution? Would you rather have lattice or ggplot or perhaps both as well as base R graphics? Would you make many of the built-in functions more consistent, so for instance, the data being worked on would be the first argument whenever possible? One reason there are so many packages is not so much due to the superiority of R but because people find it lacks quite a bit. Much of that should not be included, of course, if R is meant to be somewhat on the lean side, and yes, packages are a deliberate way to extend it when needed. But when people use it and think they are programming in R, ... __ R-he
Re: [R] tidying up
For those wishing to make changes to r-help or seeking info on the R mailing lists in general, please consult: https://www.r-project.org/mail.html You may wish to cc Martin Maechler on any proposals for change, as he is one of the maintainers -- or at least can contact the maintainers -- of these lists. Nothing will change if they don't change it. (I believe he does monitor the traffic here, though.) Note the first line on that mailing list page: "**Please** read the instructions below and the posting guide before sending anything to any mailing list!" Still THE definitive statement of proper use of these lists, alas often more honored in the breach than the observance. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Feb 27, 2022 at 4:07 PM Micha Silver wrote: > > > On 27/02/2022 21:34, Avi Gross via R-help wrote: > > This mailing list seems to steadily get messages that some see as not > > relevant to this forum. In particular, some see it as wrong to bring up > > some things here and keep reminding people of some ground rules. > > So I want to know, briefly, if it is reasonable to ask a person with a > > question or problem to reproduce their problem another way. If using > > RSTUDIO or one of many IDE, can they run the code on a naked R interpreter > > by sourcing the file or copying it in or typing it anew, or perhaps using > > IDLE which comes by default with many installations of R? If using a > > library (which I like so I am not really in agreement about the > > unsuitability) like the tidyverse which is free and available to all even > > if loosely associated with the RSTUDIO folks and that can be run on any > > version of R that I am aware of, then some questions may still be fair if > > they are really about more general R issues as much of the rest of the code > > may be base R and may be the cause of whatever issue is being reported. > > And, some simple requests like pointing out a missing comma, ... > > > > I have stated my thought before and it boils down to the reality that there > > are some things about earlier versions of R that were far from perfect or > > complete and a little healthy competition is not a bad thing and may help > > base R evolve. Not everything in the tidyverse is better and it keeps > > evolving and deprecating older features, but it cannot really be ignored > > any longer. If you apply for a job at some company as something of an R > > expert, you may well be asked by all kinds of people about their programs > > that use the tidyverse for help or to help them solve a problem. You don't > > have to like it, but if you cannot read it, you no longer are really > > qualified in many places. > > > There's an easy way to test this: > > There are already several r-sig-* lists. I might suggest to create a new > r-sig-base list. Those who want to ask and answer issues dealing with > base R only would be invited to migrate to that list. Then this current > list could be broadened to address questions about R as well as other > (popular) packages. > > > Yes, the list might get flooded with questions about obscure packages, > or about statistics. But if no one answers, posters will eventually > learn to go straight to the package maintainers, or elsewhere. And, > along the way, it would save the numerous "irrelevant, off topic..." > responses that you refer to. > > > Kind regards, > > > > Ask yourself if a language like R was created from scratch, what graphics > > might be built into the base distribution? Would you rather have lattice or > > ggplot or perhaps both as well as base R graphics? Would you make many of > > the built-in functions more consistent, so for instance, the data being > > worked on would be the first argument whenever possible? > > > > One reason there are so many packages is not so much due to the superiority > > of R but because people find it lacks quite a bit. Much of that should not > > be included, of course, if R is meant to be somewhat on the lean side, and > > yes, packages are a deliberate way to extend it when needed. But when > > people use it and think they are programming in R, ... > > > > __ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > -- > Micha Silver > Ben Gurion Univ. > Sde Boker, Remote Sensing Lab > cell: +972-523-665918 > https://orcid.org/-0002-1128-1325 > > __ >
Re: [R] tidying up
FWIW my brief answer to your brief question is "of course" it is okay. The real problem however are the questions that can only be answered by people with detailed understanding of non-R-related issues, such as the workings of the custom interactive graphics device used by RStudio or the broken behavior of some random GitHub-hosted package. There are a continuum of possible "degrees of relevance" that a question can have to the topic of a given discussion area (e.g. web forum or mailing list). The people who don't use RStudio don't gain benefit from wading through discussions that only have relevance to that tangential topic, and the more of that there is the lower the signal-to-noise ratio is from their perspective... and the sooner they leave. Ideally we will be kind in our redirection of the uninitiated, but an actual answer may not be feasible here... going elsewhere for a specific question should not be viewed as a negative outcome. Since there are various interpretations of where the line should be drawn, it is best that it be drawn as the discussion area charter says it should... in this case, about R, the language. It is pretty explicit that discussion of contributed packages is not on-topic... presumably because allowing that can easily lead to highly arcane discussions that don't necessarily help people understand the R language better. I think the existence of contributed packages and various development tools is hugely beneficial and I depend on many of them... but that doesn't automatically give any of them carte blanche to become actual topics of discussion here. On February 27, 2022 11:34:33 AM PST, Avi Gross via R-help wrote: >This mailing list seems to steadily get messages that some see as not relevant >to this forum. In particular, some see it as wrong to bring up some things >here and keep reminding people of some ground rules. > >So I want to know, briefly, if it is reasonable to ask a person with a >question or problem to reproduce their problem another way. If using RSTUDIO >or one of many IDE, can they run the code on a naked R interpreter by sourcing >the file or copying it in or typing it anew, or perhaps using IDLE which comes >by default with many installations of R? If using a library (which I like so I >am not really in agreement about the unsuitability) like the tidyverse which >is free and available to all even if loosely associated with the RSTUDIO folks >and that can be run on any version of R that I am aware of, then some >questions may still be fair if they are really about more general R issues as >much of the rest of the code may be base R and may be the cause of whatever >issue is being reported. And, some simple requests like pointing out a missing >comma, ... > >I have stated my thought before and it boils down to the reality that there >are some things about earlier versions of R that were far from perfect or >complete and a little healthy competition is not a bad thing and may help base >R evolve. Not everything in the tidyverse is better and it keeps evolving and >deprecating older features, but it cannot really be ignored any longer. If you >apply for a job at some company as something of an R expert, you may well be >asked by all kinds of people about their programs that use the tidyverse for >help or to help them solve a problem. You don't have to like it, but if you >cannot read it, you no longer are really qualified in many places. > >Ask yourself if a language like R was created from scratch, what graphics >might be built into the base distribution? Would you rather have lattice or >ggplot or perhaps both as well as base R graphics? Would you make many of the >built-in functions more consistent, so for instance, the data being worked on >would be the first argument whenever possible? > >One reason there are so many packages is not so much due to the superiority of >R but because people find it lacks quite a bit. Much of that should not be >included, of course, if R is meant to be somewhat on the lean side, and yes, >packages are a deliberate way to extend it when needed. But when people use it >and think they are programming in R, ... > >__ >R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. -- Sent from my phone. Please excuse my brevity. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tidying up
Indeed, Jim, the hopeful purpose of interactions here is to help people without doing the job for them. As you note, sometimes it is help in getting them to formulate what they are trying to do and maybe see the resolution on their own, or give enough info that others can troubleshoot. I have dealt with people on and off forums like this who know very little and have done some rudimentary search and found something they hope is helpful and then get stuck. Some have no actual interest in learning R or Python or anything and see it as a one-time thing. For them, any sustained interaction is just frustrating. Others may want a tutor, albeit mahy of us here are not willing or able to provide endless hours to volunteer. And some, may be better off spending the money to hire someone and I assume there are places they can be directed. -Original Message- From: Jim Lemon To: Avi Gross Cc: r-help@r-project.org Sent: Sun, Feb 27, 2022 4:52 pm Subject: Re: [R] tidying up Hi Avi, I just sent in an answer to a very simple question. In many cases it seems to me that the real problem isn't apparent from the request. ektaraK appears to have almost no experience with R (sorry if I'm wrong). A person in this position may sort of know what they want to do but do not know how to ask the question. What's a reproducible example? So I often submit really dumb looking answers that show the person how to ask the question. If I'm successful, the OP learns how to do some basic operation, but also learns how to ask the next question. Until they get there, most responses just give them a typing exercise. Jim On Mon, Feb 28, 2022 at 6:35 AM Avi Gross via R-help wrote: > > This mailing list seems to steadily get messages that some see as not > relevant to this forum. In particular, some see it as wrong to bring up some > things here and keep reminding people of some ground rules. > > So I want to know, briefly, if it is reasonable to ask a person with a > question or problem to reproduce their problem another way. If using RSTUDIO > or one of many IDE, can they run the code on a naked R interpreter by > sourcing the file or copying it in or typing it anew, or perhaps using IDLE > which comes by default with many installations of R? If using a library > (which I like so I am not really in agreement about the unsuitability) like > the tidyverse which is free and available to all even if loosely associated > with the RSTUDIO folks and that can be run on any version of R that I am > aware of, then some questions may still be fair if they are really about more > general R issues as much of the rest of the code may be base R and may be the > cause of whatever issue is being reported. And, some simple requests like > pointing out a missing comma, ... > > I have stated my thought before and it boils down to the reality that there > are some things about earlier versions of R that were far from perfect or > complete and a little healthy competition is not a bad thing and may help > base R evolve. Not everything in the tidyverse is better and it keeps > evolving and deprecating older features, but it cannot really be ignored any > longer. If you apply for a job at some company as something of an R expert, > you may well be asked by all kinds of people about their programs that use > the tidyverse for help or to help them solve a problem. You don't have to > like it, but if you cannot read it, you no longer are really qualified in > many places. > > Ask yourself if a language like R was created from scratch, what graphics > might be built into the base distribution? Would you rather have lattice or > ggplot or perhaps both as well as base R graphics? Would you make many of the > built-in functions more consistent, so for instance, the data being worked on > would be the first argument whenever possible? > > One reason there are so many packages is not so much due to the superiority > of R but because people find it lacks quite a bit. Much of that should not be > included, of course, if R is meant to be somewhat on the lean side, and yes, > packages are a deliberate way to extend it when needed. But when people use > it and think they are programming in R, ... > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] tidying up
Hi Avi, I just sent in an answer to a very simple question. In many cases it seems to me that the real problem isn't apparent from the request. ektaraK appears to have almost no experience with R (sorry if I'm wrong). A person in this position may sort of know what they want to do but do not know how to ask the question. What's a reproducible example? So I often submit really dumb looking answers that show the person how to ask the question. If I'm successful, the OP learns how to do some basic operation, but also learns how to ask the next question. Until they get there, most responses just give them a typing exercise. Jim On Mon, Feb 28, 2022 at 6:35 AM Avi Gross via R-help wrote: > > This mailing list seems to steadily get messages that some see as not > relevant to this forum. In particular, some see it as wrong to bring up some > things here and keep reminding people of some ground rules. > > So I want to know, briefly, if it is reasonable to ask a person with a > question or problem to reproduce their problem another way. If using RSTUDIO > or one of many IDE, can they run the code on a naked R interpreter by > sourcing the file or copying it in or typing it anew, or perhaps using IDLE > which comes by default with many installations of R? If using a library > (which I like so I am not really in agreement about the unsuitability) like > the tidyverse which is free and available to all even if loosely associated > with the RSTUDIO folks and that can be run on any version of R that I am > aware of, then some questions may still be fair if they are really about more > general R issues as much of the rest of the code may be base R and may be the > cause of whatever issue is being reported. And, some simple requests like > pointing out a missing comma, ... > > I have stated my thought before and it boils down to the reality that there > are some things about earlier versions of R that were far from perfect or > complete and a little healthy competition is not a bad thing and may help > base R evolve. Not everything in the tidyverse is better and it keeps > evolving and deprecating older features, but it cannot really be ignored any > longer. If you apply for a job at some company as something of an R expert, > you may well be asked by all kinds of people about their programs that use > the tidyverse for help or to help them solve a problem. You don't have to > like it, but if you cannot read it, you no longer are really qualified in > many places. > > Ask yourself if a language like R was created from scratch, what graphics > might be built into the base distribution? Would you rather have lattice or > ggplot or perhaps both as well as base R graphics? Would you make many of the > built-in functions more consistent, so for instance, the data being worked on > would be the first argument whenever possible? > > One reason there are so many packages is not so much due to the superiority > of R but because people find it lacks quite a bit. Much of that should not be > included, of course, if R is meant to be somewhat on the lean side, and yes, > packages are a deliberate way to extend it when needed. But when people use > it and think they are programming in R, ... > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] tidying up
This mailing list seems to steadily get messages that some see as not relevant to this forum. In particular, some see it as wrong to bring up some things here and keep reminding people of some ground rules. So I want to know, briefly, if it is reasonable to ask a person with a question or problem to reproduce their problem another way. If using RSTUDIO or one of many IDE, can they run the code on a naked R interpreter by sourcing the file or copying it in or typing it anew, or perhaps using IDLE which comes by default with many installations of R? If using a library (which I like so I am not really in agreement about the unsuitability) like the tidyverse which is free and available to all even if loosely associated with the RSTUDIO folks and that can be run on any version of R that I am aware of, then some questions may still be fair if they are really about more general R issues as much of the rest of the code may be base R and may be the cause of whatever issue is being reported. And, some simple requests like pointing out a missing comma, ... I have stated my thought before and it boils down to the reality that there are some things about earlier versions of R that were far from perfect or complete and a little healthy competition is not a bad thing and may help base R evolve. Not everything in the tidyverse is better and it keeps evolving and deprecating older features, but it cannot really be ignored any longer. If you apply for a job at some company as something of an R expert, you may well be asked by all kinds of people about their programs that use the tidyverse for help or to help them solve a problem. You don't have to like it, but if you cannot read it, you no longer are really qualified in many places. Ask yourself if a language like R was created from scratch, what graphics might be built into the base distribution? Would you rather have lattice or ggplot or perhaps both as well as base R graphics? Would you make many of the built-in functions more consistent, so for instance, the data being worked on would be the first argument whenever possible? One reason there are so many packages is not so much due to the superiority of R but because people find it lacks quite a bit. Much of that should not be included, of course, if R is meant to be somewhat on the lean side, and yes, packages are a deliberate way to extend it when needed. But when people use it and think they are programming in R, ... __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tidying up code - Warning message: deparse may be incomplete
On 28/08/2008 10:46 AM, Marie Pierre Sylvestre wrote: Dear R users, I am currently writing a R package and to do so I am following the guidelines in manual 'Writing R extensions'. In Section 3.1, it is suggested to tidy up the code using a file containing the following: options(keep.source = FALSE) source(myfuns..R) dump(ls(all = TRUE), file = new.myfuns.R) I have done this for my own packages and although it runs, I get several warnings of the type: Warning message: In dump(ls(all = TRUE), file = PermAlgo.R) : deparse may be incomplete I am clueless as to what this means. Even if I try to tidy only one function from my code, I get the warning. E.g. the file lala.R contains only this: partialHazards - function(t, v, covArray, betas){ exp( covArray[v,t,] %*% betas ) } the file tidylala.R contains: options(keep.source = FALSE) source(lala.R) dump(ls(all = TRUE), file = newlala.R) On Linux I run: R --vanilla tidylala.R Then I obtain: Warning message: In dump(ls(all = TRUE), file = newlala.R) : deparse may be incomplete The file newlala.R looks like this: `partialHazards` - function (t, v, covArray, betas) { exp(covArray[v, t, ] %*% betas) } What does the warning mean? Can I simply ignore it? I've now taken a look, and this really was a bug. source() was partially ignoring options(keep.source = FALSE), and this confused dump(). I've fixed it in R-patched. I've also clarified the advice about tidying up code, by adding a warning that following it will delete all of your comments. I think you're better off writing it in a tidy way in the first place, or using a smart editor to reformat it. R retains enough information to write a code prettifier that preserves comments, but I don't know of one. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tidying up code - Warning message: deparse may be incomplete
DM == Duncan Murdoch [EMAIL PROTECTED] on Fri, 29 Aug 2008 08:36:12 -0400 writes: DM On 28/08/2008 10:46 AM, Marie Pierre Sylvestre wrote: Dear R users, I am currently writing a R package and to do so I am following the guidelines in manual 'Writing R extensions'. In Section 3.1, it is suggested to tidy up the code using a file containing the following: options(keep.source = FALSE) source(myfuns..R) dump(ls(all = TRUE), file = new.myfuns.R) I have done this for my own packages and although it runs, I get several warnings of the type: Warning message: In dump(ls(all = TRUE), file = PermAlgo.R) : deparse may be incomplete I am clueless as to what this means. Even if I try to tidy only one function from my code, I get the warning. E.g. the file lala.R contains only this: partialHazards - function(t, v, covArray, betas){ exp( covArray[v,t,] %*% betas ) } the file tidylala.R contains: options(keep.source = FALSE) source(lala.R) dump(ls(all = TRUE), file = newlala.R) On Linux I run: R --vanilla tidylala.R Then I obtain: Warning message: In dump(ls(all = TRUE), file = newlala.R) : deparse may be incomplete The file newlala.R looks like this: `partialHazards` - function (t, v, covArray, betas) { exp(covArray[v, t, ] %*% betas) } What does the warning mean? Can I simply ignore it? DM I've now taken a look, and this really was a bug. source() was DM partially ignoring options(keep.source = FALSE), and this confused DM dump(). I've fixed it in R-patched. DM I've also clarified the advice about tidying up code, by adding a DM warning that following it will delete all of your comments. I think DM you're better off writing it in a tidy way in the first place, or using DM a smart editor to reformat it. R retains enough information to write a DM code prettifier that preserves comments, but I don't know of one. I strongly agree with your last paragraph, and I have always thought that we should recommend using R-aware editors rather than dump() nowadays ... but then I thought that I've been biased at all times, being a co-developer of ESS, authoring its M-x ess-fix-miscellaneous (and more), and also the author of a (non public) Emacs lisp file called 'R-stylepolice.el' as early as in 1999. Martin Maechler DM Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tidying up code - Warning message: deparse may be incomplete
Martin Maechler wrote: I strongly agree with your last paragraph, and I have always thought that we should recommend using R-aware editors rather than dump() nowadays ... but then I thought that I've been biased at all times, being a co-developer of ESS, authoring its M-x ess-fix-miscellaneous (and more), and also the author of a (non public) Emacs lisp file called 'R-stylepolice.el' as early as in 1999. BTW: Has there been any progress on turning the highlighting _off_ in iESS and transcript mode? The highlighted for and in make me crazy... -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Tidying up code - Warning message: deparse may be incomplete
Dear R users, I am currently writing a R package and to do so I am following the guidelines in manual 'Writing R extensions'. In Section 3.1, it is suggested to tidy up the code using a file containing the following: options(keep.source = FALSE) source(myfuns..R) dump(ls(all = TRUE), file = new.myfuns.R) I have done this for my own packages and although it runs, I get several warnings of the type: Warning message: In dump(ls(all = TRUE), file = PermAlgo.R) : deparse may be incomplete I am clueless as to what this means. Even if I try to tidy only one function from my code, I get the warning. E.g. the file lala.R contains only this: partialHazards - function(t, v, covArray, betas){ exp( covArray[v,t,] %*% betas ) } the file tidylala.R contains: options(keep.source = FALSE) source(lala.R) dump(ls(all = TRUE), file = newlala.R) On Linux I run: R --vanilla tidylala.R Then I obtain: Warning message: In dump(ls(all = TRUE), file = newlala.R) : deparse may be incomplete The file newlala.R looks like this: `partialHazards` - function (t, v, covArray, betas) { exp(covArray[v, t, ] %*% betas) } What does the warning mean? Can I simply ignore it? thanks, MP __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Tidying up code - Warning message: deparse may be incomplete
On 28/08/2008 10:46 AM, Marie Pierre Sylvestre wrote: Dear R users, I am currently writing a R package and to do so I am following the guidelines in manual 'Writing R extensions'. In Section 3.1, it is suggested to tidy up the code using a file containing the following: options(keep.source = FALSE) source(myfuns..R) dump(ls(all = TRUE), file = new.myfuns.R) I have done this for my own packages and although it runs, I get several warnings of the type: Warning message: In dump(ls(all = TRUE), file = PermAlgo.R) : deparse may be incomplete I am clueless as to what this means. Even if I try to tidy only one function from my code, I get the warning. E.g. the file lala.R contains only this: partialHazards - function(t, v, covArray, betas){ exp( covArray[v,t,] %*% betas ) } the file tidylala.R contains: options(keep.source = FALSE) source(lala.R) dump(ls(all = TRUE), file = newlala.R) On Linux I run: R --vanilla tidylala.R Then I obtain: Warning message: In dump(ls(all = TRUE), file = newlala.R) : deparse may be incomplete The file newlala.R looks like this: `partialHazards` - function (t, v, covArray, betas) { exp(covArray[v, t, ] %*% betas) } What does the warning mean? Can I simply ignore it? The warning means that you may have lost some information, i.e. sourcing newlala.R won't produce the same thing as sourcing lala.R. I think in your case, there's no loss, so it's a bug, but I don't have time to track down why you're getting it. Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.