similar to: counting specific elements in a column of a matrix

Displaying 20 results from an estimated 9000 matches similar to: "counting specific elements in a column of a matrix"

2005 Mar 08
1
To convert an adjacency list model into a nested set model
Dear R-help I am wondering if somebody wrote some code to convert an adjacency list model into a nested set model. In principal I want to do the same as John Celko mentioned it here with SQL: http://groups.google.co.uk/groups?hl=en&lr=lang_en&selm=8j0n05%24n31%241 %40nnrp1.deja.com Assume you have a tree structure like this Albert / \ /
2002 Nov 28
1
IP address change
A while back samba was installed on a machine with IP address 10.1.0.19, default router 10.1.0.1. The IP address was recently changed to 10.2.0.57, default router 10.2.0.1. The share used to be available across our network as specified by hosts allow. However, since the IP Address change ONLY 10.2 machines can see the share. It is no longer available to the whole network. The server itself can be
2006 Oct 20
1
Cardinality constraint
Hello, How do I implement a cardinality constraint with constrOptim? I want to minimize (least square) a%*%x = 4 subject to x1<2 x2<1 x3<4 count(x1, x2, x3)= 2 (cardinality constraint) Is there a way to specify binary integer variables with constrOptim? Here's my code so far: a <-matrix(1:3,1,3) fr <- function(x) { (a%*%x-4)^2 }
2009 Apr 26
1
constrained optimization
Is there any R package addressing problems of constrained optimization ? I have the following "apparently" simple problem: Given a set V with fixed cardinality: nv Given a set S whose cardinality is a parameter: nHat Let the cardinality of the intersection S.and.V be: nHatv The problem consists of maximizing nHatv/nv subject to a penalty if nHat >
2012 Jun 15
1
DEoptim example illustrating use of fnMap parameter for enforcement of cardinality constraints
Function DEoptim in package DEoptim for differential evolution defines an optional parameter fnMap: fnMap "an optional function that will be run after each population is created, but before the population is passed to the objective function. This allows the user to impose integer/cardinality constriants." Unfortunately, there is no further documentation decribing the kind of
2013 Nov 01
1
[PATCH] curve25519-sha256@libssh.org key exchange proposal
Here are three versions (patch against openbsd cvs) 1) repace nacl w/libsodium, so i could test 2) curve25519-donna 3) Matthew's public domain reference implementation. i'd vote for #3 -------------- next part -------------- Am 30.10.2013 um 07:27 schrieb Damien Miller <djm at mindrot.org>: > On Tue, 24 Sep 2013, Aris Adamantiadis wrote: > >> Dear OpenSSH
2008 Mar 23
2
(no subject)
Is there any way to use more than one color or shape in the same plot. I would like to make the points different colors for various levels of a variable. I have tried a simple 'if' statement in the plot command, but I get an error message. Here is what I have tried and the error message I get: > plot(test, if(test[,1]<8) col="steelblue2" else col="wheat2")Error
2012 Oct 18
2
How to import data from text file using scan() Function?
Hi.... I have one text file which containing 4 variables with 10 observations. I would like to import with scan() function. Please give some suggestion............ Thanks... Mydata set is. id name sex age 111 HELEN f 22 112 DONNA f 22 113 ERIC m 21 114 LINDA f 23 115 AXEL m 27 116 Madhuri f 32 117 Tarun m 39 118 Aashirya f 23 119 Nachik m 24 120 Leena f 32 -- View this message in context:
2001 May 10
1
Samba binary on AIX
Hi, I was searching for a version of Samba (2.0.7) but I've not found any compiled version for IBM AIX 4.3.3... Are there any issues on that platform? Are you planning to relaesa a binary version? Thanks, Michele Donna ____________ GE Global eXchange Services Product Specialist GE Global eXchange Services Via San Gregorio 34 20124 Milano, Italia Tel. +39 02 66705.1 - Fax +39 02 6694496
2015 Jun 10
7
curve25519
I have developed a compact at the same time high performance library for curve25519/ed25519 and I have placed it in the public domain. It support DH key exchange as well as ed25519 keygen, sign and verify. The implementation is constant-time, supports blinding, bulk-verify and more. The library is available as portable-C as well as ASM for Intel-x64 CPUs. It outperforms curve25519-donna by a
2013 Nov 02
3
[PATCH] curve25519-sha256@libssh.org key exchange proposal
It should be compatible with the original patch. However I think that the shared secret should be encoded as a string, too. What does libssh do? > Am 02.11.2013 um 05:46 schrieb Damien Miller <djm at mindrot.org>: > >> On Fri, 1 Nov 2013, Markus Friedl wrote: >> >> Here are three versions (patch against openbsd cvs) >> >> 1) repace nacl w/libsodium,
2009 Sep 15
1
R Memory Usage Concerns
Hello all, To start with, these measurements are on Linux with R 2.9.2 (64-bit build) and Python 2.6 (also 64-bit). I've been investigating R for some log file analysis that I've been doing. I'm coming at this from the angle of a programmer whose primarily worked in Python. As I've been playing around with R, I've noticed that R seems to use a *lot* of memory, especially
2004 Apr 10
4
(offtopic) I need two sets of 5 different color scales
Hi, I am plotting a policy function (result from a dynamic stochastic optimization problem, discretized approximation). The policy function maps from an 2 x 2 x 2 x 3 x B x F state space to a B x F state space (B and F are usually between 4-6, and represent domestic and foreign savings. The other variables are income (Y), inflation (Pi), domestic and foreign interest rates (R and Z)). I
2004 Nov 30
1
speex player for PPC
Hi, i'm making this speex recorder and player for PocketPC (it's for school) and i was wondering if anyone here could tell me what i'd need to create the player... it has to be a stand-alone program, not a plug-in for windows media player etc. i'd need the speex decoder right? do i need to make any changes? i really have no idea, thanks for any help =) Donna
2011 Apr 30
1
help with a survplot
Dear useRs, I was asked to produce a survival curve like this: http://www.palug.net/Members/jabba/immaginetta.png/view with the cardinality of the riskset at the bottom. I do not like doing it, because it doesn't add any valuable information and because it doesn't discriminate between died and censored. Nevertheless, is there someone able to tell me how to do it? Currently the only
2011 Oct 07
1
BitSet equivalent? Java code usable?
Hi all, I consider writing a R package on statistics for the sorting method as a hobby. I have written a private Java application that I could use as a basis. Therefore I'd like to ask two questions: 1) logical vectors: Bit storage (small) and capable of bit operations? The Java application relies on BitSet(s) for efficiency reasons. Arrays of logical values cost far too much memory (in the
2007 Feb 07
3
odd mock behavior
I''m seeing some odd behavior around the should_receive() when given a block combined with some cardinality. For example, with the following... my_mock.should_receive(:foo).twice do |i| puts i end ... the spec passes but i never gets puts''ed. With the following... my_mock.should_receive(:foo) do |i| puts i end ... i gets puts''ed twice but the spec fails because
2006 Nov 30
2
non-searchable columns, normalization
Hello. I am new to Ferret. I am using it through Acts as Ferret. Let''s say I have such a table, and all columns are indexed using the default behavior provided by acts_as_ferret: ARTICLES -id -year -body [1] A typical request will be "select id from articles where KEYWORDS % body". Will id be indexed for fulltext searching? clearly the fulltext index on id will never be
2011 Apr 04
1
Ordering every row of a matrix while ignoring off diagonal elements
Sorry if this is a stupid question but I've been stuck on how to code so that I can order rows of a matrix without paying attention to the diagonal elements. Say, for example, I have a matrix d: > d [,1] [,2] [,3] [,4] [1,] 0.000000 2.384158 2.0065682 2.2998856 [2,] 2.384158 0.000000 1.4599928 2.4333213 [3,] 2.006568 1.459993 0.0000000 0.9733285 [4,] 2.299886
2009 Dec 20
2
how to create three new variables? Thanks a lot!
Dear R experts: I have following data structure: student id, exam time and score. I want to create three new columes: 1 st before, 2nd before and 3rd before. For example, for student 1's 4th exam score is assumed to be influenced by his previous three cloest scores, which are 6, 9, and 10 in that order. For student 2's 5th exam score is assumed to be inflenced by her previous cloest