Le 11.04.2006 14:12, Prof Brian Ripley a ?crit :
That's an interesting suggestion, but
1) it is not a good idea to change the order of arguments in a function.
Yes, my mystake. It's because i like to call 'history(something)' directly
and not 'history(pattern=something)'.
I hadn't in mind the possibility to break existing code.
2) is the 'unique' argument useful? I cannot see it being used if
there is no pattern search, nor I do see the merit in showing repeated
lines if I have subselected.
3) like ls(), testing if 'pattern' were missing or NULL would be a better
idea.
Right.
There is also a problem with the order of the calls.
If I do :
ls()
l <- mean(rnorm(50))
ls()
history(pattern="^l")
it prints :
ls()
l <- mean(rnorm(50))
when it should print :
l <- mean(rnorm(50))
ls()