Displaying 20 results from an estimated 20000 matches similar to: "isolate elements in vector that match one of many possible values"
2010 Oct 06
3
Assigning value to a vector from within a function
Hi all,
I am having trouble assigning a value within a vector using a variable
defined within a function. I suspect this has something to do with
namespaces but I cannot figure it out. Please reply directly to me if you
can help.
###begin code
#simple vector
test<-c(4,5,6)
#simple function to get a value from a vector
#works just like I would expect, has no problem indexing using the local
2009 May 13
4
matching period with perl regular expression
Hello,
I have several strings where I am trying to eliminate the period and
everything after the period, using a regular expression. However, I am
having trouble getting this to work.
> x = "wa.w"
> gsub(x, "\..*", "", perl=TRUE)
[1] ""
Warning messages:
1: '\.' is an unrecognized escape in a character string
2: unrecognized escape removed
2009 Jan 30
1
problem using identify() after plot()
I can't seem to use the point-and-click identify() function properly.
I'm running R 2.5.1 (I know, I need to get around to upgrading) under
Win XP. The problem is, when I click on a point on the graph, I get an
error, "no point within 0.25 inches." But in some areas, I can click
where there is no visible point anywhere close, and an identify() label
will pop up. The troublesome
2008 Sep 04
2
using complete.cases() with nested factors
Hello,
This maybe a newbie question. I have a dataframe that looks like the sample
at the bottom of the email. I have monthly precipitation data from several
sites over several years. For each site, I need to extract years that have
a complete series of 12 monthly precipitation values, while excluding that
year for sites with incomplete data. I can't figure out how to do this
gracefully
2009 Nov 20
3
help me avoid nested for() loops!
Hi R folks,
I have a massive array (object name "points") in the following form
[,1] [,2]
[1,] 1369 22
[2,] 1370 22
[3,] 1368 23
[4,] 1369 23
[5,] 1370 23
[6,] 1371 23
(10080 rows truncated)
These represent pixel coordinates of interest in a jpeg image. I need
to find the distance from each point to all other points of interest.
The only way I can see to do this
2010 Aug 09
5
Drawing problem in Wine 1.3.0
Hi, I'm having a problem with black boxes and black widgets appearing in
Wine programs. See these two screenshots[0], [1] for examples. One
program is a Windows application, but the other is Winecfg. Any clues
what is wrong here? This is Wine 1.3.0 compiled on Debian squeeze.
Thanks,
Andrew Barr
[0] http://img843.imageshack.us/img843/5373/screenshotho.png
[1]
2006 Feb 09
3
Rail in teaching environments
Newbie question (just joined the list)
Is anyone running Ruby on Rails in a teaching environment?
Regards
John
John Colby BA, MBCS, PGCertE
Lecturer, Department of Computing, The Business School
Room F316, Galton Building, University of Central England,
Franchise Street, Perry Barr, Birmingham B42 2SU
Tel: +44 (0) 121 331 6937, Fax +44 (0) 121 331 6281, Mobile: 07795 215
912
2009 Jun 12
1
xtable for plm objects
Hello,
I am trying to use Sweave to write up a report, and I have used the
plm package to do some panel models. I am trying to use xtable to make
a nice table for my regression objects (returned by the plm command),
but I am getting the error:
Error in UseMethod("xtable") : no applicable method for "xtable"
It seems like I would want to have xtable treat plm objects exactly
2009 Mar 04
1
dividing ts objects of different frequencies
Hello,
I have two time series objects, 1 is yearly (population) and the other is
quarterly (bankruptcy statistics). I would like to produce a quarterly time
series object that consists of bankruptcy/population. Is there a pre-built
function to intelligently divide these time series:
br.ts = ts(data=br.df[,-1], frequency = 4, start=c(2001,1), end=c(2008,2))
distPop.ts = ts(data=distPop.df[,-1],
2007 Jun 25
1
conflict between lme4 and RMySQL packages (PR#9753)
Full_Name: Dale Barr
Version: 2.5.1 (patched)
OS: Ubuntu linux x86_64
Submission from: (NULL) (138.23.70.108)
When RMySQL is loaded in before lme4, the summary() function for lmer objects in
the lme4 packages produces the following error:
Error in printMer(object) : no slot of name "status" for this object of class
"table"
When RMySQL is loaded AFTER lme4, however, no such
2009 Jan 23
0
high values of my response variable get chopped off of lattice dotplots
I am trying the following lattice graphics code:
> library(lattice)
> attach(junk)
> summary(junk)
mean.barr variable value
Min. : 3.50 item15 :15 Min. :0.0000
1st Qu.: 9.50 item14 :14 1st Qu.:0.0000
Median :11.00 item16 :14 Median :0.0000
Mean :11.64 item1 : 0 Mean :0.6744
3rd Qu.:16.00 item2 : 0 3rd Qu.:1.0000
Max. :20.00 item3 :
2006 Mar 31
1
Asterisk, QSIG and Tenovis PBX?
Hi,
we are still trying to properly connect a Tenovis PBX to an Asterisk server
(asterisk 1.2.6, libpri 1.2.2, zaptel 1.2.5, Digium Wildcard TE110P), this
time with QSIG.
Calling from a Tenovis phone to a SIP phone (i.e. traditional phone ->
Tenovis PBX -> QSIG -> Asterisk -> SIP phone) works with the following
messages:
---
Don't know what to do if second ROSE component is of
2005 Nov 18
1
Fonts broken in post-0.9.1 CVS
Fonts on Wine CVS post-0.9.1 are very ugly:
http://www.oakcourt.dyndns.org/~andrew/wine-cvs.png
But if I replace a custom-built Wine CVS installation with the Wine 0.9.1
Debian sid package from Sourceforge, it looks much better:
http://www.oakcourt.dyndns.org/~andrew/wine-0.9.1-sf.net.png
I have the latest FreeType library from Debian unstable installed: 2.1.10.
The same version
2006 Aug 12
1
Lockup on VT switch
Hi, I'm having trouble with Compiz and suspending on an i855GM machine
with X.org 7.1.1 (AIGLX) and Debian sid. If Compiz is running when the
resume process switches back to X after having suspended, my X server
locks. It is possible to ssh in and 'killall -9' it, but of course then
my session is gone and I have to log in again, defeating the purpose of
suspend/resume. I suppose, given
2007 Jul 30
1
[R300] high Xorg process CPU usage
On Fri, 2007-07-27 at 23:45 -0400, Andrew J. Barr wrote:
> I am trying out the Compiz Fusion stuff on my PowerBook G4 (RV350) and
> I have the aiglx-zero-copy-tfp patches from here[0] on Mesa 6.5.2,
> xorg-server 1.3, and xf86-video-ati 6.6.191. I notice that the Xorg
> process has a high level of CPU utilization (higher than with metacity
> or vanilla compiz), but the graphics
2009 May 19
1
panel question (plm)
Hello,
I am working on a data set (already as a plm.data object) located
here: http://econsteve.com/arch/plmWithDensity.Robj
With the following R session:
> library(plm)
...
>load("plmWithDensity.Robj")
>model <- plm(RATE ~ density08, data=plmWithDensity)
Error: subscript out of bounds
I am not understanding the "subscript out of bounds" error, as this is
a
2007 Aug 06
2
11kbps narrowband on a 24bit DSP
Hi,
I am using speex 1.2beta2 on a 24bit DSP that has a severe program and
data space limitations. I am only interested in the speex decoder for
11kbps narrowband implementation.
I am using the following parameters and structures
160, /*frameSize*/
40, /*subframeSize*/
10, /*lpcSize*/
17, /*pitchStart*/
144, /*pitchEnd*/
/* 11 kbps medium bit-rate
2012 Jul 04
2
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
Evening,
I was writing some code that tried to insert calls to the
llvm.annotation intrinsic function, which has a signature of (i32,
i8*, i8*, i32). The code is below.
void addAnnotation( BasicBlock *block, Function *F)
{
string foo = "foo";
string bar = "barr";
Type *charTy = Type::getInt8Ty(block->getContext());
ArrayType *s1Ty =
2004 Nov 28
5
Newbie-needs help
Hello all:
I''ve read the documentation and am not quite sure where to start.
What I''m trying to do is build a network with a 3 NIC Shorewall router.
My system is behind a routed /49 network.
I''d like to use 2 or 3 of the static IP addresses for my DMZ ( DNS server, mail, webserver etc ) and
then have my remaining machines in a private network NATed is some way.
My
2006 Mar 12
5
AR - Migrations - how to use a varchar as primary key instead of int ?
Hi
I''d like to have a varchar primary key named id instead of the default int
id. Does anyone knows how to specify this from migrations ?
Should I also specify something in the model class ?
thanks!
Thibaut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060312/797bca4b/attachment.html