Displaying 20 results from an estimated 3000 matches similar to: "For Loop Error"
2012 Jan 28
2
finding rows in a matrix that match a vector
Hi,
Please excuse my ignorance, but I am just learning R (this is my very first
day programming in R) and having a really hard time figuring out how to do
the following:
I have a matrix that is 1000 row by 6 columns (named 'table.combos') and a 1
row by 6 column vector (named 'mine'). I want to find every row in
'table.combos' that equals 'mine' and then count
2017 Dec 20
2
outlining (highlighting) pixels in ggplot2
Using the small reproducible example below, I'd like to know if one can
somehow use the matrix "sig" (defined below) to add a black outline (with
lwd=2) to all pixels with a corresponding value of 1 in the matrix 'sig'?
So for example, in the ggplot2 plot below, the pixel located at [1,3] would
be outlined by a black square since the value at sig[1,3] == 1. This is my
first
2010 Jan 25
3
question on sqldf syntax
trying to structure sql to merge two datasets. structure follows:
dbs.possible.combos (all possible combinations of dates and places)
Date Place
1/1/10 N-01
1/1/10 S-02
1/2/10 N-01
1/2/10 S-02
etc...
dbs.aggregate (the raw data aggregated by date and location)
Date Place Days
1/1/10 N-01 6
1/1/10 S-02 10
1/2/10 S-02 5
Trying to merge so I look-up the values for each possible combo
dbs.final
2010 Aug 09
2
TRUE/FALSE
Here is my code
# determine the DDOA measurements
for(e in 1:numSensors)
{
for(f in 1:numSensors)
{
if((combos[e,f]==1)
{
# true distance between each sensor and the target
truedistance[e]<-sqrt((targetX-sensorX[e])^2+(targetY-sensorY[e])^2)
# add an error that has a N(0, sigma^2) distribution
truedistance[e]<-(truedistance[e]+rnorm(1,
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
Hello
I apologise for the length of this entry but please bear with me.
In short:
I need a way of subsampling communities from all possible communities of n
taxa taken 1:n at a time without having to calculate all possible
combinations (because this gives me a memory error - using
combn() or expand.grid() at least). Does anyone know of a function? Or can
you help me edit the
combn
or
2012 Oct 21
2
help speeding up simple Theil regression function
Hello,
I am working on a simple non-parametric (Theil) regression function and and
am following Hollander and Wolfe 1999 text. I would like some help making
my function faster. I have compared with pre-packaged version from "MBLM",
which isnt very fast either, but it appears mine is faster with N = 1000
(see results below). I plan on running this function repeatedly, and I
generally
2009 Dec 18
2
Generating permutations that always include one specific element
Dear R community,
I am trying to create a matrix of permutations of a vector:
bands <- c("AL", "B", "DB", "DG", "G", "K", "LB", "LG", "MG", "O", "P",
"PI", "PK", "PU", "R", "V", "W", "Y")
Each permutation must be 4
2011 Jun 24
2
SQL Changing Data Type
Passing in two dates to a sql statement (sqldf). Is returning a factor. Tried
setting back to a Date via as.Date, but get an error the error: character
string is not in a standard unambiguous format. Any thoughts appreciated.
Code/Results listed below:
> summary(df.possible.combos)
Date Hour
Min. :2011-03-01 Min. : 0.00
1st Qu.:2011-03-23 1st Qu.: 5.75
2009 May 27
1
contour lines on persp plot
Hello folks,
I am a beginner R user. I have been able to make a 3D surface plot using
'persp'. The surface is made by a grid of lines emanating perpendicularly
from each of the x and y axes at regular intervals.
I can get rid of that grid by setting 'border=NA'.
Can anyone suggest some ways to replace the grid with contour lines, to
create a 3-dimensional contour map?
Thanks
2013 Nov 26
4
Unsupported Hardware that works fine?
I recently purchased a set of ASRock Intel i5 MB/CPU combos for a budget
compute cluster. Every time we load up a system and try to boot with a
recent EL6/64 ISO, we get a message that reads:
> This hardware (or a combination thereof) is not supported by CentOS.
For more
> information on supported hardware, plesae refer to
http://www.centos.org/hardware
Not only does the hardware
2006 Dec 10
2
Slightly off topic question but ...
I'm using files for passwords that look like the unix passwd and shadow
files, except each domain has it's own pair of shadow and password files
for that domain. And dovecot works fine with that.
So - here's my off topic question. I'm trying to create a PHP interface
to allow user to change their password in these passwd / shadow file
combos. What kind of encryption do they
2013 May 16
1
Contour lines in a persp plot
Hello folks,
i'm a R beginner and i want to put in a same plot both contour lines
and persp plot.
For example,
fn<-function(x,y){sin(x)+2*y} #this looks like a corrugated tin roof
x<-seq(from=1,to=100,by=1) #generates a list of x values to sample
y<-seq(from=1,to=100,by=1) #generates a list of y values to sample
z<-outer(x,y,FUN=fn) #applies the funct. across the combos of x
2005 Aug 16
10
quad t1 / 1U rack server combos
It is amazing to me at this point that there is not an official Digium
list of supported servers (including 1u models!). Clearly the number 1
issue with the Digium PRI cards is the server that they are used in.
The new cards even go as far as listing server that DO NOT work on the
Digium site!
The wiki references are old and do not have any testing parameters.
C'mon guys! Certify a
2009 Nov 25
2
encoding image from a webcam
I'm trying to encode a picture from my webcam using the theora
codec. The final "product"
must encode a frame, send it over the network and decode it on "the
other side".
For now, it must only work locally so we don't care about the transmission.
This is what I've understood till now: I have a char * buffer from the
camera RG24,I convert it to
YCbCr 4:4:4, I
2008 Sep 05
1
binary order combinations
Dear all!
I have a vector of names
names<-("V1", "V2", "V3",....., "V15")
I could create all possible combinations of these names (of all
lengths) using R:
combos<-lapply(1:15,function(x)
{combn(names,x)
})
I get a list with all possible combinations of elements of 'names'
that looks like this (just the very beginning of it):
[[1]] - the
2008 Mar 26
2
DTMF suddenly stopped working on SIP channel
Hi All,
Anyone have any idea what could cause incoming calls on a SIP channel
to no longer be able to use DTMF? DTMF on incoming calls on zaptel and
on local SIP softphones and ATAs all work fine. Nothing gets
registered in the CDR or on the console in verbose level 10, it just
times out. I haven't changed anything on my part and can't get through
to Viatalk tech support to ask them
2013 Mar 06
6
Latest Xen on ARM Fast Models
Hi,
I''m having some problems with getting the latest linux kernel and xen build
working on ARM''s Fast Model simulator ( Cortex A15 ). I tried a lot of
different configurations and I''m having trouble with all of them. I got all
my information from the wiki pages at
http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions#Building_Xen_on_ARM
.
I was hoping
2004 May 31
0
Doubts on anova and use of contrasts in multcomp package
Dear list,
I have been studying R and I would like the aid of more experienced to solve the problems of the analysis below:
r = gl(3, 8, label = c('r1', 'r2', 'r3'))
e = rep(gl(2, 4, label = c('e1', 'e2')), 3)
y = c(26.2, 26.0, 25.0, 25.4, 24.8, 24.6, 26.7, 25.2, 25.7, 26.3, 25.1, 26.4,
19.6, 21.1, 19.0, 18.6, 22.8, 19.4, 18.8, 19.2, 19.8, 21.4,
2008 Feb 08
2
Applying lm to data with combn
http://www.nabble.com/file/p15359204/test.data.csv
http://www.nabble.com/file/p15359204/test.data.csv test.data.csv
Hi,
I have used apply to have certian combinations, but when I try to use these
combinations I get the error
[Error in eval(expr, envir, enclos) : object "X.GDAXI" not found]. being a
novice I donot understand that after applying combination to the data I cant
access
2004 Jun 08
18
[ANNOUCE] iproute2 update
A new version of the iproute2 utilities is available to handle the new
extensions for 2.6.7.
* Based on the last known good version of iproute2 from Alexy
* Included most of the vendor patches (except for the stupid ones).
* Got rid of lots of the glibc workarounds, I intend this to build
and run on 2.6 (and 2.4) only.
* Fixed some parsing and formatting bugs.
* Added gigabit as a rate.