[R] (-8)^(1/3) == NaN?

2009-07-18 Thread Dave DeBarr
Why does the expression (-8)^(1/3) return NaN, instead of -2?

This is not answered by 
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-powers-of-negative-numbers-wrong_003f

Thanks,
Dave


[[alternative HTML version deleted]]

__
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] R-2.7.2 infected?

2008-09-22 Thread Dave DeBarr
I tried downloading R-2.7.2 
(http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from 
Berkeley and cran) and both times I got a warning from Computer Associates 
eTrust Antivirus (version 7.1.710) that the Win32/Adclicker.JO trojan was 
detected:
The Win32/Adclicker.JO was detected in 
C:\USERS\USER\APPDATA\LOCAL\MICROSOFT\WINDOWS\TEMPORARY INTERNET 
FILES\LOW\CONTENT.IE5\61HAYRTG\R-2.7.2-WIN32[1].EXE.

Has anyone else seen this?

Thanks,
Dave


[[alternative HTML version deleted]]

__
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] R-2.7.2 infected?

2008-09-23 Thread Dave DeBarr
 Did you check the md5 checksum on it?

Yes; it matched: 540090dd892657804d1099c54d6f770d


 You're the first to report it, and 2.7.2 has been out for almost a month, so 
 I think it's likely that the CRAN copy is uninfected.

Sounds promising.  Perhaps it's a false positive from eTrust.


 If it matches and you still get the virus checker reporting, please let me 
 know the details about that infection

eTrust still reports the signature match for Win32/Adclicker.JO; but I don't 
know anything about Win32/Adclicker.JO.  Unfortunately, eTrust doesn't provide 
a link to a description of Win32/Adclicker.JO.

For what it's worth, I'm using version 7.1.710 of Computer Associates eTrust 
Antivirus (with version 31.6.6099 of its signature file).

I'll try to find out more.

Thanks,
Dave

-Original Message-
From: Duncan Murdoch [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2008 8:41 PM
To: Dave DeBarr
Cc: r-help@r-project.org
Subject: Re: [R] R-2.7.2 infected?

Dave DeBarr wrote:
 I tried downloading R-2.7.2 
 (http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from 
 Berkeley and cran) and both times I got a warning from Computer Associates 
 eTrust Antivirus (version 7.1.710) that the Win32/Adclicker.JO trojan was 
 detected:
 The Win32/Adclicker.JO was detected in 
 C:\USERS\USER\APPDATA\LOCAL\MICROSOFT\WINDOWS\TEMPORARY INTERNET 
 FILES\LOW\CONTENT.IE5\61HAYRTG\R-2.7.2-WIN32[1].EXE.

 Has anyone else seen this?
You're the first to report it, and 2.7.2 has been out for almost a
month, so I think it's likely that the CRAN copy is uninfected.  Did you
check the md5 checksum on it?  It matches on the original, so if it
doesn't match at your end, you've got a bad download.

If it matches and you still get the virus checker reporting, please let
me know the details about that infection, and I'll try to do a manual
inspection for 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.


Re: [R] R-2.7.2 infected?

2008-09-29 Thread Dave DeBarr
For what it's worth, Computer Associates updated their signatures; and eTrust 
no longer reports the installation program for the Windows version of R-2.7.2 
as infected.

I found it surprisingly difficult to learn about how the Win32/Adclicker.JO 
virus operates, and how eTrust detects it.  I couldn't even get anyone to admit 
it was a false positive (though it seems clear now).

Regards,
Dave

From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Ajay ohri [EMAIL 
PROTECTED]
Sent: Tuesday, September 23, 2008 1:06 AM
To: Peter Dalgaard
Cc: r-help@r-project.org; Dave DeBarr; Duncan Murdoch
Subject: Re: [R] R-2.7.2 infected?

This is what it does. It seems like a false alarm because in case of
actual infection it seems
quite conspicious

Ajay

www.decisionstats.com



http://www.spywareguide.com/product_show.php?id=2569


Full Name:
Win32.AdClicker Websearch   Read More
Type:Trojan
SG Index: 5 [Explain]
Removal tools:List of products that detect/remove/protect against
Win32.AdClicker:
Desktop Anti-malware: Pro User: X-Cleaner
Control IM and P2P use, block spyware and other malware: RTGuardian
Endpoint Spyware Remediation: Greynet Enterprise Manager
IM, P2P control, malware prevention and web filtering in single
appliance: Unified Security Gateway
Category Description:A Trojan is a program that enables an attacker to
get nearly complete control over an infected PC. Frequently used tool
by malicious hackers. When this program executes, the program performs
a specific set of actions. This usually works toward the goal of
allowing the trojan to survive on a system and open up a backdoor

.
Comment:This Trojan downloads many executable.It changes the
autostarter randomly. It also hijacks the desktop and puts a wall
paper saying that the system is affected and advertises a sites
?smart-security.info?.It duplicates each and every file which the user
creates with the same name and in the same Directory.


Properties:
 Adds other software
 Autostarts/Stays Resident
 Installs Through Exploit
 Opens ports
On Tue, Sep 23, 2008 at 1:29 PM, Peter Dalgaard
[EMAIL PROTECTED] wrote:

 Peter Dalgaard wrote:
  Dave DeBarr wrote:
  Did you check the md5 checksum on it?
 
 
  Yes; it matched: 540090dd892657804d1099c54d6f770d
 
 
  And it is binary identical to the Austria CRAN one.
 
  You're the first to report it, and 2.7.2 has been out for almost a
  month, so I think it's likely that the CRAN copy is uninfected.
 
 
  Sounds promising.  Perhaps it's a false positive from eTrust.
 
 
 
  Likely. A quick Googling indicates that other programs have been
  caught too.
  This link is illuminative:
  http://www.cccp-project.net/forums/index.php?topic=2897.0

 (I wanted to do the same thing with R, but http://www.virustotal.com has
 a 20M cap on the file size.)

 --
   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.



--
Regards,

Ajay Ohri
http://tinyurl.com/liajayohri
__
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-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] Question about expression parser for "return" statement

2016-11-13 Thread Dave DeBarr
I've noticed that if I don't include parentheses around the intended return
value for the "return" statement, R will assume the first parenthetical
expression is the intended return value ... even if that parenthetical
expression is only part of a larger expression.

Is this intentional?

I'm guessing it is intentional; but since there is no warning about
ignoring the rest of the expression, it could lead to hard-to-find bugs.

Thanks,
Dave

Here's an example ...

dnorm(2, 0, 1)
normalDensityFunction = function(x, Mean, Variance) {
# no parentheses surrounding the entire "return" value
return (1/sqrt(2*pi*Variance))*exp(-(1/2)*((x - Mean)^2)/Variance)
}
normalDensityFunction(2, 0, 1)# incorrect answer
normalDensityFunction = function(x, Mean, Variance) {
# parentheses surrounding the entire "return" value
return ((1/sqrt(2*pi*Variance))*exp(-(1/2)*((x - Mean)^2)/Variance))
}
normalDensityFunction(2, 0, 1)# correct answer

[[alternative HTML version deleted]]

__
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.