search for: nsel

Displaying 13 results from an estimated 13 matches for "nsel".

Did you mean: nsec
2016 Apr 02
3
apply mean function to a subset of data
...t;m" rows from group 2 and calculate the mean as well. So far I've been using a for loop for doing it but when it comes to a large data set is rather inefficient. Any hint to vectorize this would be appreciated. toy = data.frame(group = c(rep(1,10),rep(2,8)), diam = c(rnorm(10),rnorm(8))) nsel = c(6,4) smean <- c(0,0) for (i in 1:2) smean[i] <- mean(toy$diam[1:nsel[i]]) Thanks Pedro [[alternative HTML version deleted]]
2016 Apr 03
1
apply mean function to a subset of data
Here are several ways to get there, but your original loop is fine once it is corrected: > for (i in 1:2) smean[i] <- mean(toy$diam[toy$group==i][1:nsel[i]]) > smean [1] 0.271489 1.117015 Using sapply() to hide the loop: > smean <- sapply(1:2, function(x) mean((toy$diam[toy$group==x])[1:nsel[x]])) > smean [1] 0.271489 1.117015 Or use head() > smean <- sapply(1:2, function(x) mean(head(toy$diam[toy$group==x], nsel[x]))) > smea...
2016 Apr 02
0
apply mean function to a subset of data
Hi Pedro, This may not be much of an improvement, but it was a challenge. selvec<-as.vector(matrix(c(nsel,unlist(by(toy$diam,toy$group,length))-nsel), ncol=2,byrow=TRUE)) TFvec<-rep(c(TRUE,FALSE),length.out=length(selvec)) toynsel<-rep(TFvec,selvec) by(toy[toynsel,]$diam,toy[toynsel,]$group,mean) Jim On 4/3/16, Pedro Mardones <mardones.p at gmail.com> wrote: > Dear all; > > This...
2016 Jun 24
2
UPS is not turned off in slave-only configuration?
On Mittwoch, 22. Juni 2016 17:50, Roger Price wrote: On Wed, 22 Jun 2016, Andr? H?nsel wrote: > > Now, what I see is that when the UPS feeding server-1 goes LB, > > server-1 is indeed shut down, but it seems that the UPS is never switched off. > > > > This is a problem because when power is restored after shutdown, but > > before the battery runs out...
2009 Mar 30
2
Why are files synced again and again when not using -a?
Hi, usually I use rsync with -a but recently I used it without this option and discovered that the same files are synced over and over again (as shown by -v). Of course the rsync algorithm avoids the traffic but the files are all listed. As soon as I use -a for one time those files are not transferred again, even when I remove the -a again. So I suspect, when building the file list, rsync
2015 Nov 26
2
install rrdtools-devel / rrdtool-perl
I will expand a little bit more. I need to install nfdump, when I beggin installation process: [root at ARM-LXMON01 nfdump-1.6.13]# ./configure \--prefix=/usr/local \--sysconfdir=/etc \--mandir=/usr/share/man \--enable-nfprofile \--enable-nftrack \--enable-sflow \--enable-nsel checking for rrd_update in -lrrd... no configure: error: Can not link librrd. Please specify --with-rrdpath=.. configure failed! I do: [root at ARM-LXMON01 nfdump-1.6.13]# find / -name librrd* /usr/lib64/librrd.so.4 /usr/lib64/librrd.so.4.2.1 /usr/lib64/librrd_th.so.4 /usr/lib64/librrd_th.so.4.2...
2015 Nov 26
2
install rrdtools-devel / rrdtool-perl
Hi guys , Im have some problems installing the following packages: rrdtool-devel rrdtool-perl Before we moved to centos/rhel7 it was a simple task, just doing: yum install rrdtool rrdtool-devel and rrdtool-perl was enough. Now, I only can install the rrdtool package but not rrdtool-devel and rrdtool-perl. I tryed adding some repos, but I think I added wrong ones. Also tryed downloading and
2016 Jun 23
2
What is the purpose of the upsmon setting in upsd.users?
[please use reply-all when responding - the list does not mangle reply-to headers. thanks!] On Jun 22, 2016, at 4:06 AM, Andr? H?nsel wrote: > > On Mittwoch, 22. Juni 2016 09:21 Andr? wrote: > >> Hi list, >> >> (I think) I understand that in upsmon.conf, the MONITOR line ends with >> "master" or "slave". Basically if it's master it will wait for slaves to >> shut d...
2016 Jun 22
2
UPS is not turned off in slave-only configuration?
I have two hosts. One is the ups-server. It's generator powered and can be assumed to never go down. This is the one that all the UPSs are connected to. It has: - the UPSs configured in upsd.conf - a "upsmon master" user in upsd.users - an empty upsmon.conf The other one is server-1. Its upsmon.conf contains: MONITOR test-apc at ups-server 1 monuser blah slave Now, what I see is
2016 Jun 22
0
UPS is not turned off in slave-only configuration?
On Wed, 22 Jun 2016, Andr? H?nsel wrote: > Now, what I see is that when the UPS feeding server-1 goes LB, server-1 is > indeed shut down, but it seems that the UPS is never switched off. > > This is a problem because when power is restored after shutdown, but before > the battery runs out (with no load, it continues...
2005 Aug 29
3
added Choicebook
Here are the new files in a zip and the patches to existing. Also added Listbook values to parents.rb that I forgot when adding that. Sean _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2000 May 24
0
v2.0.6 problem with unique mktemp() file names for printer spooling files...
...system... Is this a bug or did I something wrong? I experimented with name mangling, upper and lower case conversion but nothing did work. I found nothing about that in the docs/faqs, it seems to be trivial that the spooling works, but it doesn't. Any ideas? Thank you very much Christian Guensel [TestPrint] path = /usr/spool/testprint comment = Test Dokumentdrucker browseable = yes printable = yes read only = yes guest ok = true create mode = 0400 print command = "/usr/local/sbin/handle_printupload %I %s %U -- Christian G?nsel, Zentraldata-GmbH Leipzig gue...
2016 Jun 22
2
What is the purpose of the upsmon setting in upsd.users?
Hi list, (I think) I understand that in upsmon.conf, the MONITOR line ends with "master" or "slave". Basically if it's master it will wait for slaves to shut down and if it's slave it will signal the master to switch off the UPS after shutdown. To be able to monitor a network UPS as a slave, there must be a user in upsd.users on the master system. This user needs to