On 03/09/17 12:29, Duncan Murdoch wrote:
On 02/09/2017 6:57 PM, Rolf Turner wrote:
On 03/09/17 03:56, William Dunlap via R-help wrote:
Is the reason you want a block comment containing code (as opposed to
arbitrary text) that you want to be able to easily run the commented out
code? If so th
On 02/09/2017 6:57 PM, Rolf Turner wrote:
On 03/09/17 03:56, William Dunlap via R-help wrote:
Is the reason you want a block comment containing code (as opposed to
arbitrary text) that you want to be able to easily run the commented out
code? If so the 'if()' construct has the advantage that yo
On 03/09/17 03:56, William Dunlap via R-help wrote:
Is the reason you want a block comment containing code (as opposed to
arbitrary text) that you want to be able to easily run the commented out
code? If so the 'if()' construct has the advantage that you only need to
change code at the start of
Hello all,
this is the first time I'm using R and e1071 package and SVM multiclass
(and I'm not a statistician)! I'm very confused, then. The goal is: I
have a sentence with sunny; it will be classified as "yes" sentence; I
have a sentence with cloud, it will be classified as "maybe"; I have a
On Sat, 2 Sep 2017, Andrea Altomani wrote:
Thanks for the very detailed explanation.
I did not create the series using structure(), that was the result of dump()
on an intermediate object created within tsdisagg::ta(),
There is no tsdisagg package on CRAN, just tsdisagg2. But this does not
ha
This is exactly as expected. See section 4.3.3 of the R Language definition
or google around on "R Lazy Evaluation" for details.
You should not "expect" R's semantics to be the same as other languages
with which you may be familiar. Spending time with a good tutorial or two
should help you sort ou
Yes, this is intended behavior, and it has everything to do with where the
parameters are first referenced and nothing to do with debugging.
--
Sent from my phone. Please excuse my brevity.
On September 2, 2017 10:22:22 AM PDT, Matthias Gondan
wrote:
>Dear R developers,
>
>sessionInfo() below
Dear Bill,
All makes perfect sense (including the late evaluation). I actually discovered
the problem by looking at old code which used your proposed solution. Still I
find it strange (and, hnestly, I don’t like R’s behavior in this respect), and
I am wondering why u is not being copied to L ju
Another way to avoid the problem is to not redefine variables that are
arguments. E.g.,
> Su3 <- function(u=100, l=u, mu=0.53, sigma2=4.3^2, verbose)
{
if (verbose) {
print(c(u, l, mu))
}
uNormalized <- u/sqrt(sigma2)
lNormalized <- l/sqrt(sigma2)
muNormalized <- mu/sq
Hello,
One way of preventing that is to use ?force.
Just put
force(l)
right after the commented out print and before you change 'u'.
Hope this helps,
Rui Barradas
Citando Matthias Gondan :
Dear R developers,
sessionInfo() below
Please have a look at the following two versions of the
Dear R developers,
sessionInfo() below
Please have a look at the following two versions of the same function:
1. Intended behavior:
> Su1 = function(u=100, l=u, mu=0.53, sigma2=4.3^2)
+ {
+ print(c(u, l, mu)) # here, l is set to u’s value
+ u = u/sqrt(sigma2)
+ l = l/sqrt(sigma2)
+ mu =
Is the reason you want a block comment containing code (as opposed to
arbitrary text) that you want to be able to easily run the commented out
code? If so the 'if()' construct has the advantage that you only need to
change code at the start of the comment, not at both ends.
The if(FALSE) could be
I agree, since one reason for block commenting is to include
syntactically-invalid information (such as broken code) in the source code.
However, block commenting is not wholly a good thing, as both the R parser and
human coders often find it challenging to identify where the end of the block
i
Uwe showed an R code -ish way to do it. RStudio and probably other R UI's
and IDE's -- which is the way most folks write code, I think -- also make
it easy to do.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- O
AFAIK block comment is not possible
it needs to be implemented in R interpreter and defined in the
parser.'If' solution is not elegant.
On 2 September 2017 at 14:09, Uwe Ligges
wrote:
>
>
> On 02.09.2017 11:40, Christian wrote:
>>
>> I consider it quite worth while to introduce into R syntax a ne
On 01/09/2017 7:37 PM, Yingrui Liu wrote:
Dear Sir/Madam,
How to use getSymbols() to get annual data? For example, I need the annual
stock price of APPLE from the year 2000 to 2016. How to write the command? I
only know how to get the daily data. It is:
getSymbols("AAPL",from="2000-01-01",t
On 02.09.2017 11:40, Christian wrote:
I consider it quite worth while to introduce into R syntax a nestable
block comment like
#{
}#
if(FALSE){
}
Best,
Uwe Ligges
It would make documentation more easily manageable and lucid.
Is there considerable need for this.
Please, comment on thi
Thanks for the very detailed explanation.
I did not create the series using structure(), that was the result of
dump() on an intermediate object created within tsdisagg::ta(), which is
where I found the error in the first place. ta() indeed manipulates .Tsp
directly, rather than using ts. I guess
hi merlin,
Check out the hetcor package.
Jim
On Sat, Sep 2, 2017 at 6:25 AM, wrote:
> I would be very grateful if you would tell me how I can find the degree of
> correlation between a nominal dependent variable and an independent ordinal
> variable. The nominal variable has only two levels: Y
I consider it quite worth while to introduce into R syntax a nestable
block comment like
#{
}#
It would make documentation more easily manageable and lucid.
Is there considerable need for this.
Please, comment on this.
How about R core?
Christian
--
Christian Hoffmann
Rigiblickstrasse 15b
CH
20 matches
Mail list logo