John,
What would be nice is not necessarily trivial.
Consider an example. After running a line of code with an assignment statement,
did you know the last value has been saved in .Last.value as in this snippet of
code:
> x <- 12
> .Last.value
[1] 12
> y <- .Last.value**2
> y
[1] 144
> .Last.va
Avi,
Yes, R (really S) was not designed for novice users but rather for experts. For
better or worse it has evolved into a programming language used by tyros, and
experts. Debugging tools should be easy to use, generally known, and helpful
for tyro and expert. It would certainly help if R repor
Thanks for pointing out the options. Using
options(show.error.locations = TRUE)
works on Ivo's example, but it doesn't show a location if the error
happens in a function that doesn't have srcrefs, because the known
location isn't on the top of the stack.
Perhaps TRUE (and maybe "top"?) s
Arguably, R was not designed or evolved for truly novice users, nor really was
Python or just about all computer languages. As they evolved and became in many
ways more powerful, they tended to get ever less user friendly in the way you
are asking for and gotten so bloated that many features are
Luke,
The fact that there are alternative ways to do things does not mean that the a
new, better way, should not be considered. You note three options that I have
never heard for, nor read about despite using R for many years. Ibest most uses
don't know about these options. Ivo, was correct when
I think I considered doing that many years ago, but one or more of the
following stopped me:
- It will mess up old test scripts that are checking for the old
format error messages.
- Some errors are due to a severe lack of resources (e.g. full stack,
out of some other kind of memory, etc.)
understood.
but, please, consider not people like me but unwary beginners and
students of R. I have used R now for decades, and even I am baffled
by it. Couldn't you make R code easier to debug not only for people
like me (who can indeed tweak their environments) but also for novice
users?
On S
On Sun, 19 Jan 2025, Ivo Welch wrote:
Hi Duncan — Wonderful. Thank you. Bug or no bug, I think it would be
a huge improvement for user-friendliness if R printed the last line by
default *every time* a script dies. Most computer languages do so.
Should I file it as a request for improvement t
Dear John,
Here's the summary for your model:
- snip -
> summary(model)
Call:
lm(formula = income ~ education * gender, data = data)
Residuals:
1 2 3 4 5 6
-4.286e+00 -5.000e+00 6.429e+00 -1.080e-14 -2.143e+00 5.000e+00
Coeffici
Hi Duncan — Wonderful. Thank you. Bug or no bug, I think it would be
a huge improvement for user-friendliness if R printed the last line by
default *every time* a script dies. Most computer languages do so.
Should I file it as a request for improvement to the R code
development team? Maybe R c
Sent from my iPhone
> On Jan 19, 2025, at 2:48 PM, David Winsemius wrote:
>
>
> Sent from my iPhone
>
>> On Jan 19, 2025, at 1:57 PM, David Winsemius wrote:
>>
>> I don’t understand why you don’t include the full text of the error.
>>
>> —
>> David
>> Sent from my iPhone
>>
On Jan
On 2025-01-18 8:27 p.m., Ivo Welch wrote:
I am afraid my errors are worse! (so are my postings. I should have
given an example.)
```
x <- 1
y <- 2
nofunction("something stupid I am doing!")
z <- 4
```
and
```
source("where-is-my-water.R")
Error in nofunction("something stupid I am doing!")
12 matches
Mail list logo