similar to: Help understanding behavior of apply vs sapply

Displaying 20 results from an estimated 7000 matches similar to: "Help understanding behavior of apply vs sapply"

2006 Mar 28
2
atan2(1,1i)
Hi ?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex vectors. Well, I would expect atan2(1,1i) to be equal to atan(-1i), but > atan2(1,1i) Error in atan2(y, x) : Non-numeric argument to mathematical function > R.version _ platform powerpc-apple-darwin8.5.0 arch powerpc os darwin8.5.0 system powerpc, darwin8.5.0
2006 Mar 28
2
atan2(1,1i)
Hi ?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex vectors. Well, I would expect atan2(1,1i) to be equal to atan(-1i), but > atan2(1,1i) Error in atan2(y, x) : Non-numeric argument to mathematical function > R.version _ platform powerpc-apple-darwin8.5.0 arch powerpc os darwin8.5.0 system powerpc, darwin8.5.0
2006 Mar 11
5
500 Internal Server error
Sort of new at all this... I installed Ruby on Rails on my Mac according to the instructions on HiveLogic''s blog. I can run the server and even create my database schema automatically. But when I try to open up my results, I end up getting a 500 Internal Server error on my browser. My Unix terminal reads the following: dyld: NSLinkModule() error dyld: Symbol not found:
2006 Mar 29
1
write.table and segment fault?
Hi, I'm experiencing R segmentation faults on multiple versions of R when writing out a particular data.frame: ## dd is a 44 by 3 data.frame load(url("http://stat.bell-labs.com/RS-DBI/download/dd.rda")) write.table(dd, file = "dd.csv", sep = ",", row.names = FALSE) this occurs on > sessionInfo() R version 2.2.0, 2005-10-06, i686-pc-linux-gnu
2006 Apr 06
4
GraphicsMagick or ImageMagick and RMagic on OS X
Hi all, I''ve been trying to install GraphicsMagick with RMagic. I''ve tried ImageMagick with RMagic as well. I''ve tried the installations using Darwin Ports, Gems and from source. Nothing seems to work properly. My specs: ruby --version ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0] rails --version Rails 1.1.0 convert -version Version: ImageMagick 6.1.8 04/05/06 Q16
2001 Jul 16
0
fsck'ing a mounted fs
Hi. Is there any reasonable possibility to check a mounted fs for errors? It would be useful to have server-filesystems (and harddisks) checked periodically on machines that are only rebooted by hardware-failures ;-) Regards, Christian -- * Christian A. Lademann, ZLS Software GmbH mailto:lademann@zls.de * ZLS Software GmbH * Frankfurter Strasse 59 Postfach 1628
2001 Jul 16
1
Fwd: fsck'ing a mounted fs
Christian Lademann wrote: Hi. Is there any reasonable possibility to check a mounted fs for errors? It would be useful to have server-filesystems (and harddisks) checked periodically on machines that are only rebooted by hardware-failures ;-) Regards, Christian -- * Christian A. Lademann, ZLS Software GmbH mailto:lademann@zls.de * ZLS Software GmbH * Frankfurter Strasse 59
2001 Jul 20
3
ext2resize for Ext3
Hi. What is the state of ext2resize for Ext3? How about the online-ext3-patch? Regards, Christian -- * Christian A. Lademann, ZLS Software GmbH mailto:lademann@zls.de * ZLS Software GmbH * Frankfurter Strasse 59 Postfach 1628 mailto:zls@zls.de * D-65779 Kelkheim D-65766 Kelkheim http://www.zls.de * Telefon +49-6195-9902-0 Telefax
2006 Mar 08
5
Ruby/LDAP on Rails
This is wierd. I''m trying to get Ruby/LDAP up and working, and at least the basics work fine under irb: irb(main):001:0> require ''ldap'' => true irb(main):002:0> LDAP::Conn.new() => #<LDAP::Conn:0x1b87ac> irb(main):003:0> So far, so good. All LDAP::Conn.new does is call ldap_init with host and port parameters, which in turn just allocates the
2006 May 23
4
Where''s Ruby? Too many Ruby interpreters on OS X.
I seem to have two versions of Ruby on my PowerBook. I have been learning RoR and walked through the online scripted install of Ruby and Rails several weeks ago before I really understood what was going on. If I open Terminal and type: ruby -v I get back: ruby 1.8.4 (2005-12-24) [powerpc-darwin8.5.0] So that looks fine, but I don''t know where my Ruby interpreter is located. I
2006 May 30
3
RubyODBC bus error under Rails
Hi all, I''ve got a very obscure problem. We''re trying to get Rails to talk to Filemaker. So we''ve setup an ODBC dsn and via RubyODBC we''re talking to it. Excellent. Try it under rails and rails won''t even startup, getting bus errors anytime we require ''odbc''. Environment OSX Tiger 10.4.6 Rails 1.1.2 Ruby 1.8.4 RubyODBC 0.998 via
1997 Sep 12
0
Dynamic Configuration Values et al.
** ** I posted this message quite a time ago. Some people use my patch and I ** receive queries for a recent version from time to time. This patch didn't ** make it into the mainstream distribution yet. Sorry. ** ** This is the updated version for Samba-1.9.17p1. ** Hello, people. I have implemented some enhancements for Samba: 1. dynamic configuration-values 2. configurable
2006 Feb 21
9
Rails and Windows Active Directory Authentication?
Hello All, I know there is a component for integrating LDAP with Rails but is anyone doing any Windows Active Directory Authentication to a Rails app? I am rebuilding a site that was constructed out of asp and I would like to rebuild/improve it via rails. On the requirements side I will need to communicate with Active Directory and I will be required to use MSSQL for the database. Can anyone
2006 Apr 20
9
How to change project location?
I moved a project from /var/www/mypro to /home/user1/mypro ... what do I have to change in config? The server does not start anymore. Thank you - Eric -- Posted via http://www.ruby-forum.com/.
2002 Dec 21
1
apply vs. sapply
Hi, sapply((1:NCOL(hermes)),function(x) hist(hermes[,x],main=names(hermes)[x])) .......this works , but i would like use it with apply to generate many plots in one step! #################################################################### >>apply((1:ncol(hermes)),2,function(x) hist(hermes[,x],main=names(hermes)[x])) Error in apply(1:ncol(hermes), 2, function(x) hist(hermes[, x], main =
2009 Feb 17
1
using sapply to apply function to some columns of a dataframe
Hello: I would like to sum every x columns of a dataframe for each row. For instance, if x is 10, then for dataframe df, this function will sum the first ten elements together and then the next ten: sapply(list(colnames(df)[1:10], colnames(df)[11:20]),function(x)apply( df[,x], 1, sum)) If the number of columns is quite large (1000's), then manually entering the list above is not practical.
2010 Jun 17
1
sapply or apply
Hi r-users, I have this code here : dt   <- winter_pos_sum bt   <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_min  <- min(bt) ; bt_min p       <- alp_sum    ; p t  <- 50 t1 <- t+1             #first get the sum over the eigenvalues for a particular power i gam_sum <-
2007 Jun 20
0
shoudl I use apply, sapply, etc instead of a "for loop"?
I have been trying to learn the various "apply" functions but am still learning their appropriate use. I appreciate any help the R community can offer me. Sorry for the length of this post. Background: I have data on my hard drive organized in the following manner: The data pertains to many different "samples" of data. (e.g. sample 001, sample, 002, sample 003, etc.) Each
2013 Apr 18
2
How to keep plot title same as column name using apply/sapply?
Dear list, I am trying to plot histogram of a 10 by 5 matrix by columns. What is a good way to paste the column names? dput(a) structure(c(0.891856482875103, 0.249593821948295, 0.0385066520473322, 0.109098868876336, 0.238035894186719, 0.971470380855763, 0.168018536530906, 0.941457062296419, -0.285381460315397, -0.0229335863796271, -20138.175683257, 28190.7238887329, 8521.44473371867,
2005 Mar 29
3
From FAQ 7.21 to a command like apply(sapply(list(f1,f2,f3),is.na),2,sum)
Dear all, Last December there was a thread regarding the famous FAQ 7.21 "How can I turn a string into a variable?" and asking what people want to do with these strings. My, certainly trivial application would be as follows: Assume I have a data.frame containing besides others also the columns f1, f2, ..., fn and I want to create a command like: apply(sapply(list(f1,f2,f3),is.na),2,sum)