Displaying 20 results from an estimated 5000 matches similar to: "problem with merging matrices"
2009 Jul 07
6
how to count number of elements in a vector that are not NA ?
Hi,
is there a simpler way to count the number of elements in a vector
that are not NA than this:
countN <- function (v) {
return (Reduce(function (x, y) x + y, ifelse(is.na(v), 0, 1)))
}
?
- Godmar
2009 Jul 22
3
time difference
Dear R People:
I am looking at the ctime attribute of two different files. It
contains the year, month, day, time of creation and time zone.
Is there a way to determine the difference between the ctimes of two
files, please?
I looked in the chron package and nothing seemed to work.
Thanks in advance,
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and
2009 Aug 03
3
if confusion
Simple question:
Why doesn't the following work? Or what 'R' rule am I missing?
tclass <- "Testing 1 2 3"
if(tclass == "Testing 1 2 3")
{
cat("Testing", tclass, "\n")
}
else
{
cat(tclass, "\n")
}
I get an error 'else' is unexpected.
Thank you.
Kevin
2009 Jul 20
2
assign question
Dear R People:
I have several vectors, sa1, sa2,...sa27 of varying lengths.
I want to produce one vector xener[1:27] which has the minimum of each sa[i].
I'm trying to set up a loop and use the assign statement, but here are
my results:
> for(i in 1:27) {
+ xener[i] <- min(assign(paste("sa",i,sep="")))
+ }
Error in assign(paste("sa", i, sep =
2009 Jul 08
2
Formatting a Table
I've created a short program to print a table of learning curve factors.
However, I cannot figure out how to format the table to:
1) Get rid of the [1]s in the first column and replace it with the values of
N.
2) Line up the first row with the factors (decimal fractions).
Thanks for any help.
The complete program and output is as follows:
> Lc<-seq(0.70,0.95,0.05) #Specify learning
2008 Aug 29
1
Most common level of a factor by
I'm looking for something along the lines of
which ( table ( x ) == max ( table ( x ) ) )
to find the most common level of one factor
by several other factors. For instance, I've got
> X <- data.frame (
+ x = factor ( sample ( c ( "A" , "B" , "C" , "D" ) , 20 , r = T ) )
+ , z1 = factor ( sample ( c ( "Before" ,
2009 Aug 26
3
changing equal values on matrix by same random number
Dear all,
I have about 30,000 matrix (512x512), with values from 1 to N.
Each value on a matrix represent a habitat patch on my
matrix (i.e. my landscape). Non-habitat are stored as ZERO.
No I need to change each 1-to-N values for the same random
number.
Just supose my matrix is:
mymat<-matrix(c(1,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,2,2,2,0,0,0,0,
0,0,0,0,2,2,2,0,0,0,0,
3,3,0,0,0,0,0,0,0,4,4,
2008 Oct 28
1
Repository missing hmisc
I'm trying to install the Hmisc package, however it doesn't appear in
the list after "utils:::menuInstallPkgs()". Any help?
--
David
2009 Jun 23
4
SAS Macro Variable in R
Hi I'm new to R and would like to implement a SAS-like macro variable
in R.
What I'd like to do is take the simple R code below and change the
"=TEF" to different letters to refer to different companies' data for
download.
# DOWNLOADS FILES FROM YAHOO INTERNET
2009 Jul 08
3
matching each row
I have two dataframes, the first column of each dataframe is a unique id
number (the rest of the columns are data variables).
I would like to figure out how many times each id number appears in each
dataframe.
So far I can use:
length( match (dataframeA$unique.id[1], dataframeB$unique.id) )
but this only works on each row of dataframe A one-at-a-time.
I would like to do this for all of
2009 May 06
6
by-group processing
Given a dataframe like
> data
ID Type N
1 45900 A 1
2 45900 B 2
3 45900 C 3
4 45900 D 4
5 45900 E 5
6 45900 F 6
7 45900 I 7
8 49270 A 1
9 49270 B 2
10 49270 E 3
18 46550 A 1
19 46550 B 2
20 46550 C 3
21 46550 D 4
22 46550 E 5
23 46550 F 6
24 46550 I 7
>
containing an identifier (ID), a
2005 Jun 10
2
Asterisk Evening in Melbourne (again!) next Thursday
Darn, and here I was thinking <small town> Melbourne, FL, USA =(
_____
From: asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of jurgen
Sent: Thursday, June 09, 2005 11:16 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion; Commercial and
Business-Oriented Asterisk Discussion
Subject: [Asterisk-Users] Asterisk Evening in
2005 Feb 09
2
Melbourne Asterisk Users meet next Thursday
Hi all,
If you're in Melbourne Australia and interested in Asterisk, you're
invited to join us for a casual evening to talk about Asterisk, VOIP,
networks, and just generally get geeky about IP phone stuff.
Ultimately, I think it would be interesting and useful to turn this
into a monthly get-together, so I'd like to talk about that too.
Anyone with an interest is welcome; from
2006 Jan 30
2
Asterisk Evening in Melbourne: Feb 2!
Hi all,
Come one come all! We're having the next Asterisk evening at the
Fujitsu Centre for Excellence! This is Fuji's state of the art
show-off centre - they're promising lots of interesting toys to play
with. As usual, we'll be discussing developments in Asterisk land over
the past couple of months. If you've got some interesting toys
yourself, please bring them along!
2003 Jan 21
1
Question Use of a domain control with windows XP prof
Dear,
I have a question
I am new to Samba but I want to create a windows domain controler in
Samba.
It works fine in combination with windows 2000 server and windows 2000
professional.
I could join the domain and log on to the domain in combination with the
windows 2000 cleints
We have here also a couple of Windows XP prof and couldn't not log on
to the samba domain controler.
I joined
2002 Oct 10
2
tapply for matrices
Does anyone have something like tapply that is extremely fast for matrices when there is a very large number of levels of the grouping variable?
I'm referring to, for example,
tapply(x, grouping.variable, function.operating.on.submatrix)
where x is a matrix and the submatrix is a subset of the rows of x. The grouping variable's length equals the number of rows of x.
--
Frank E
2009 Jun 30
2
Sweave: multiline Sexpr?
Is there any way to have Sexpr span multiple lines?
--
David
?
-----------------------------------------------------
David Huffer, Ph.D. Senior Statistician
CSOSA/Washington, DC david.huffer at csosa.gov
-----------------------------------------------------
2006 Jan 30
1
Grandstream Budgetone BT-101 audio problems
Hi all,
I'm having a really frustrating time with a bunch of BT-101 phones.
They've been trouble-free and working very well for the past several
months. A couple of days ago, some of the phones (but not all of them,
yet) have started acting very strangely. All phones are running
firmware 1.0.6.7, and are identically configured (except for the
user/authenticate/password things) on both the
2005 Feb 22
5
Am I attempting the impossible?
Hi all,
After Googling around a while, I've found bits and pieces of my
puzzle, but never someone who's got the whole thing. Here's what I'm
trying:
- Run MS Access 97 and MYOB
- Under FreeBSD 5.3
- With multiple simultaneous users (X Terminals)
Access 97 and MYOB are the only Windows programs we'll need to run,
everything else will be done with "native"
2010 Aug 05
4
A %nin% operator?
Sometimes I write code like this:
> qf.a <- subset(qf, pubid %in% c(104, 106, 107, 108))
> qf.b <- subset(qf, !pubid %in% c(104, 106, 107, 108))
and I get a little worried that maybe I've remembered the precedence rules
wrong, so I change it to
> qf.a <- subset(qf, pubid %in% c(104, 106, 107, 108))
> qf.b <- subset(qf, !(pubid %in% c(104, 106, 107, 108)))
and pretty