similar to: Count number of rows in a matrix with a character pattern

Displaying 20 results from an estimated 800 matches similar to: "Count number of rows in a matrix with a character pattern"

2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
I have a data set something like this: "YYYY", "Value" 1972 , 117 1984 , 73 1969 , 92 1976 , 113 1999 , 80 1996 , 78 1976 , 98 1984 , 106 1976 , 99 it could be created with: > dafSamp <- data.frame(cbind(c(1972,1984,1969,1976,1999,1996,1976,1984,1976),c(117,73,92,113,80,78,98,106,99))) The real dataset is of cause much larger, app. 100.000 samples
2012 Feb 28
1
Centos 6.x and Freenx issue..
Finally got a chance to install Centos 6.x x86_64 version and having an issue with the latest version of freenx. This is a desktop install on a esxi 5 with all updates and only thing I have installed is the latest vmware tools. When I enable the extras repo and install the nx-3.5.0-1.el6.ay.x86_64.rpm and freenx-0.7.3-8.el6.ay.x86_64.rpm. When I try to logon the desktop pops up but I get the
2020 Jan 06
4
can't boot after volume rename
I renamed my volume with vgrename however I didn't complete the other steps. Mainly update fstab and intiramfs. Once I booted, I was dropped on the Dracut shell. From here I can see the newly rename VG and I can lvm lvscan as well as activate it, lvm vgchange -ay. However I can't figure out what to do next, I'm assuming I need to regenerate the initramfs and then boot to change
2011 Nov 03
1
Question about Calculation of Cross Product
The function of crossprod in R puzzled me. I would like to calculate the cross product of two vectors. According to my text book, it defines like this: a = (ax, ay, az) b = (bx, by, bz) then, the cross product of a and b is: a X b = (ay*bz-az*by, az*bx-ax*bz, ax*by-ay*bz) It can also write in a determinant format. But the crossprod or tcrossprod function in R appeared not calculate the cross
2012 Feb 24
1
remove multiple objects starting with same name
Hi, I'm trying to figure out syntax R function rm() needs to remove all objects starting with same name. For example, if I have object1, object2, object3, i want to do an operation similar to UNIX rm object* Thanks. -- View this message in context: http://r.789695.n4.nabble.com/remove-multiple-objects-starting-with-same-name-tp4418694p4418694.html Sent from the R help mailing list
2006 Apr 23
3
bivariate weighted kernel density estimator
Is there code for bivariate kernel density estimation? For bivariate kernels there is kde2d in MASS kde2d.g in GRASS KernSur in GenKern (list probably incomplete) but none of them seems to accept a weight parameter (like density does since R 2.2.0) -- Erich Neuwirth, University of Vienna Faculty of Computer Science Computer Supported Didactics Working Group Visit our SunSITE at
2011 Mar 11
2
How to get all combinations between two character vectors?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I know there is a function - I have used it before - but I always forget what it is called... I need the combination of two character vectors, i.e: x <- c("a", "b") y <- c("x", "y") z <- THEFUNCTION(x, y) z == c("ax", "ay", "bx", "by") I promise I will
2009 Nov 18
2
parsing numeric values
Dear list, I'm seeking advice to extract some numeric values from a log file created by an external program. Consider the following example, input <- readLines(textConnection( "some text <ax> = 1.3770E-03 <bx> = 3.4644E-07 <ay> = 1.9412E-04 <by> = 4.8840E-08 other text <aax> = 1.3770E-03 <bbx> = 3.4644E-07
2011 Jan 08
4
LiveCD System recovery - Mounting LVM?
Hi, I am trying to recover data from my old system which had LVM. The disk had two partitions - /dev/sda1 (boot, Linux) and /dev/sda2 (Linux LVM). I had taken a backup of both partitions using dd. Now I am booting of CentOS live cd for system restore. I recreated partitions like previous system using fdisk and then used dd to dump all the data onto it. I would like to mount sda2 as LVM, but I
2009 Dec 14
2
Combinations
Dear R helpers,   I am working on the scenario analysis pertaining to various interest rates. In this connection I need to form the various combinations as under :   Suppose I have two sets A = (a, b, c) and B = (x,y,z)   Then I can easily form the cominations as (ax, ay, az, bx, by, bz, cx, cy, cz)   However, if I have say 5 variables, then total no of possible combinations will be 3^5 = 243.
2009 Dec 04
3
Combinations and joint probabilities
  Dear R helpers   Suppose I have two sets of ranges (interest rates) as   Range 1 : (7 – 7.50, 7.50 – 8.50, 8.50 – 10.00) with respective probabilities 0.42, 0.22 and 0.36.     Range II : (11-12, 12-14, 14-21) with respective probabilities 0.14, 0.56 and 0.30 respectively.     My problem is to form the combinations of these ranges in a decreasing order of joint probabilities. It is assumed that
2011 Mar 22
1
Using the mahalanobis( ) function
Hello all, I am a 2 month newbie to R and am stumped. I have a data set that I've run multivariate stats on using the manova function (I included the data set). Now it comes time for a table of effect sizes with significance. The univariate tests are easy. Where I run into trouble filling in the table of effect sizes is the Mahalanobis D as an effect size. I've included the table so
2015 Apr 01
1
can't mount an LVM volume inCentos 5.10
I have a degraded raid array (originally raid-10, now only two drives) that contains an LVM volume. I can see in the appended text that the Xen domains are there but I don't see how to mount them. No doubt this is just ignorance on my part but I wonder if anyone would care to direct me? I want to be able to retrieve dom-0 and one of the dom-Us to do data recovery, the others are of
2011 Jun 29
3
4D data acsess
Hi, I have a 4D data file from MATLAB, call it X, that I want to analyze in R. The first 3 dimensions are x y z coordinates and the forth is a value in time. If you took a sample vector in matlab it would look like vec1 = X(x1, y1, z1, :) vec2 = X( x2, y2, z2, :) this would give you all values (I have 300 of them) corresponding to this (x1,y1,z1) point of X. Now I read the MATLAB datafile 4D
2009 Jun 03
1
Hi ALL!!!
I have a one problem with Raid controller Tekram TR-822... I'm using dmraid software: root at ns1: / $ dmraid -r /dev/sda: sil, "sil_ajacddafagff", mirror, ok, 156299440 sectors, data@ 0 /dev/sdb: sil, "sil_ajacddafagff", mirror, ok, 156299440 sectors, data@ 0 When I'm start dmraid -ay: root at ns1: / $ dmraid -ay RAID set "sil_ajacddafagff" was not activated
2010 Jan 15
1
Replacing NAs with 0 for variables with the same ending
Dear all, I'm looking for a way to replace NA's with 0 for a number of variables which share the same ending and which constitute a subset of a data frame. Say, for example, there is > data <- data.frame(ax=c(1,2,3,NA,0) , bx=c(3,5,NA,5,1) , ay=c(5,NA,2,NA,0) , by=c(4,2,NA,2,1)) > data ax bx ay by 1 1 3 5 4 2 2 5 NA 2 3 3 NA 2 NA 4 NA 5 NA 2 5 0 1 0 1 I wish
2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2008 Jun 22
6
Installing Rails
Having a god-awful time installing Rails. I started with the instructions found on this page: http://articles.slicehost.com/2007/11/23/ubuntu-gutsy-mysql-and-ror I get the following error: vbfischer@ubuntu:~$ sudo gem install rails [sudo] password for vbfischer: Bulk updating Gem source index for: http://gems.rubyforge.org/ Updating metadata for 13 gems from http://gems.rubyonrails.org/
2005 May 19
2
Bug#305932: rsync on a directory transfers the files of this directory
Hi, I got the following report from a Debian user, about --files-from transferring the contents of a dir (i.e. including the files in it) specified in the input, even thugh the files aren't listed in the input. This happens only when the dir name ends with a slash. I asked him to cook up a script to reproduce this (as it wasn't quite clear to me at first what happened exactly). Any
2009 Jan 29
2
Don't get asterisk to run behind NAT router
Hi people! I am not getting smart getting asterisk 1.6 behind a NAT to run. 1. I enabled IP forwarding on debian linux 2. told asterisk in "general" that he is behind NAT and mentioned him his external static IP Adress as well his domain in the outside world. If a client who is connected with a DSL modem calls me, a grandstream module in the LAN behind the router, in the same network