similar to: prod(numeric(0)) surprise

Displaying 20 results from an estimated 10000 matches similar to: "prod(numeric(0)) surprise"

2006 Jan 10
2
Wikis (was about prod(numeric(0)))
Tony Plate <tplate <at> acm.org> writes: > > Since the virtue and reliability of Wikis was brought up, I created a R > Wiki page for this at > http://www.sciviews.org/_rgui/wiki/doku.php?id=beginners:surprises:emptysetfuncs > > > Anyone: please correct errors and improve it! > > Tony Plate > OK, now I have another question: I see a wiki at
2006 Jan 10
2
Wikis (was about prod(numeric(0)))
Tony Plate <tplate <at> acm.org> writes: > > Since the virtue and reliability of Wikis was brought up, I created a R > Wiki page for this at > http://www.sciviews.org/_rgui/wiki/doku.php?id=beginners:surprises:emptysetfuncs > > > Anyone: please correct errors and improve it! > > Tony Plate > OK, now I have another question: I see a wiki at
2008 Apr 21
4
prod(0, 1:1000) ; 0 * Inf etc
I think most of us would expect prod(0:1000) to return 0, and ... ... it does. However, many of us also expect prod(x1, x2) to be equivalent to prod(c(x1,x2)) the same as we can expect that for min(), max(), sum() and such members of the "Summary" group. Consequently, prod(0, 1:1000) should also return 0, but as you see, it gives NaN which may be a bit puzzling... The
2010 Aug 23
1
Speeding up sum and prod
Looking for more ways to speed up R, I've found that large improvements are possible in the speed of "sum" and "prod" for long real vectors. Here is a little test with R version 2.11.1 on an Intel Linux system > a <- seq(0,1,length=1000) > system.time({for (i in 1:1000000) b <- sum(a)}) user system elapsed 4.800 0.010 4.817 > system.time({for (i
2007 Oct 25
3
Deparsing part of a list argument
Here's a simple example of the type of function I'm trying to write, where the first argument is a list of functions: myfun <- function(funlist, vec){ tmp <- lapply(funlist, function(x)do.call(x, args = list(vec))) names(tmp) <- names(funlist) tmp } > myfun(list("Summation" = sum, prod, "Absolute value" = abs), c(1, 4, 6, 7)) $Summation [1]
2010 Sep 01
3
memcache in prod vs dev
I am using memcache for caching in my rails app and currently I have a dev and a production environment. I would like to run the dev environment without caching so that I can debug more easily but I wanna enable the caching in production obviously. I am using github and capistrano for deployment. Without doing a check at every statement where I can potentially dig into the cache, is there any
2011 Mar 26
1
another import puzzle
Dear list, I have another (again possibly boneheaded) puzzle about importing, again encapsulated in a nearly trivial package. (The package is posted at <http://www.math.mcmaster.ca/bolker/misc/coefsumtest_0.001.tar.gz>.) The package consists (only) of the following S3 method definitions: coeftab <- function(object, ...) UseMethod("coeftab",object) coeftab.default <-
2007 Dec 10
2
another S4 question ...
The default generic method for "show" has arguments show(object) -- (no "...") -- which precludes any kind of arguments like "digits", etc. Is it impossible, or a horrible idea, to override the generic definition? (The "arm" package has defined a new generic, "display", which does a similar thing but has an intermediate level of detail
2003 Nov 10
1
Problem with winbind and pam
Hi I'Ve set up winbind with Suse 9.0 and Samba 3.0.1 Everything i working fine exepct pam configuration How can I use pam_winbind and pam_unix2 ? > auth sufficient pam_winbind.so > auth required pam_unix2.so use_first_pass null_ok unix-users can login with correct password. NT-users can login with any password, even wrong passwords! > auth required
2013 Jan 25
3
how to delete the null elements in list
HI, I have the list: > suu [[1]] NULL [[2]] NULL [[3]] item_id prod 1 2 [[4]] item_id prod 1 2 2 4 how to delete all "NULL" elements from suu to get only >suu [[3]] item_id prod 1 2 [[4]] item_id prod 1 2 2 4 ?? Kind regards, Tammy [[alternative HTML version deleted]]
2000 Dec 08
2
R and wavelets
Does anyone know of any use of wavelets (particularly for density estimation) in R? Are there any wavelet packages? -Alex Morgan -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject
2005 Nov 10
2
error in rowSums:'x' must be numeric
Dear All, It's Eszter again from Hungary. I could not solve my problem form yesterday, so I still have to ask your help. I have a binary dataset of vegetation samples and species as a comma separated file. I would like to calculate the Jaccard distance of the dataset. I have the following error message: Error in rowSums(x, prod(dn), p, na.rm) : 'x' must be numeric In addition:
2006 Apr 07
0
Rails Prod Win 0.2
Hi all, just a quick post to inform you that I''ve released my little project Rails Prod Win on Sourceforge: http://sourceforge.net/projects/rails-prod-win I will add web contents pretty soon but I thought you might like to have a go before I get a chance to complete the web page. Apologies for those of you who already knew from my previous thread but some of the people interested in
2008 Oct 21
3
R Help
Hi, I have the following code and am using R 2.7.2: JIBqq <- (Jqrt.IB[2:length(Jqrt.IB)]/Jqrt.IB[1:(length(Jqrt.IB)-1)])-1 JIBqq <- cbind(zoo(JIBqq, Jqrt.time[2:length(Jqrt.time)])) y.JIBqq <- merge(JIBqq,lag(JIBqq,-1)) > y.JIBqq JIBqq lag(JIBqq, -1) 2004-06-30 0.003318909 NA 2004-09-30 -0.028536136 0.003318909
1997 Jun 23
1
R-alpha: comparing alpha and numeric
Is this behavior correct? (R 0.49 on SunOS 4.1.4) > "a">1 TRUE > "a"<1 FALSE > "a"==1 FALSE > "a">2 TRUE > "a"<2 FALSE (I know, this is like the old joke: "Doctor, it hurts when I do this." "Well, don't do that!" But it might be useful to have this caught by an error or warning message
2023 Apr 14
0
sum(), min(), max(), prod() vs. named arguments in ...
Hello R-devel, As mentioned on Fosstodon [1] and discussed during RCOH [2], named arguments to sum(), min(), max() and prod() are currently processed the same way as the un-named ones. Additionally, when specifying the na.rm argument more than once, the last specified value is silently taken into account. Most of this behaviour is exactly as documented, but it's arguably a source of mistakes
2006 Aug 09
0
Deployment: Best way to switch between test and prod envs.
All, Not looking for advice on the relative wisdom of my actions :). I have a Rails app. running under Apache 2/fastcgi that I would like to switch from using the test environment (database) to using the production environment (database). I can do this by hand by modifying my xx_mod_fastcgi.conf file and setting RAILS_ENV to be the appropriate value in the command that initializes my
2006 Jul 26
2
How to determine whether dev,test or prod from the code
When in a controller, how would I determine which environment I am currently running in? (Development,Test,Production) Thanks, Don Mc -- Posted via http://www.ruby-forum.com/.
2006 May 22
1
Model Modules, Dev vs Prod
I have a pretty complex model with many modules and I have been trying to keep it clean, but I find that loading the model in development mode using WebBrick is much more lenient than production mode with lighttpd/fcgi. For instance, if I neglect to create a dedicated file that declares the module then I run everything in development mode it works fine, but as soon as it is deployed I
2008 Sep 26
1
Capistrano SVN help: conflicting copies on prod and local
I''m sure this is an easy fix for folks more familiar with subversion than me, but here it goes: I''m running Capistrano and have successfully deployed my app from my local machine to my live server. The repository is on the server as well. What happened is I had to generate some files on the live server in the railsapp/current directory. So now when I try and commit something