Displaying 20 results from an estimated 13000 matches similar to: "Find all numbers in a certain interval"
2002 Jan 25
2
selecting clusters of points
All:
Are there any functions out there for selecting all the
points in a region of a plot. I envision something like the
identify() function except one could circle a cloud of points (and
perhaps a vector would be returned of the same length as the points
plotted indicating logical membership in the circled cloud). Perhaps
someone has done something with the locator() function that would
2011 Jul 05
1
if else loop
Dear R help
I was hoping you might be able to show me how to write a loop function take
would ccomplish this task.
library(prob)
{
a <- sample ( 1:20, 100, replace=T)
b<-sample(5:24,100,replace=T)
}
dd <- data.frame(a,b)
dd
# code piece I am looking for
if(subset(dd,c(1,23,ordered=F))is found))( print subset)
else( continue evaluating subsets)
subset(dd,isin(dd,c(1,23), ordered =
2009 Apr 29
1
boxplot - margin settings
Hi there,
I'm trying to solve a boxplot problem (should be simple, but I cannot find the
solution...):
data <- list( "long_name1_xxxxxxxxxxx" = rnorm(100),
"long_name2_yyyyyyyyyyyyyy" = rnorm(200))
boxplot(data , las = 2, mar = c(20,4,4,4))
Why does the margin not change whatever I put there???
With other plots it worked for me, why not in this case?
I just want to
2011 Jul 05
4
if else lop
I am trying to use if...else loop and have included a code snippet which I
might like to expand.
Maybe you could steer me in the right direction.
library(stats)
library(prob)
{
a <- sample ( 1:4,100, replace=T,prob=c(0.1,0.2,0.5,0.3))
b<-sample(3:6,100,replace=T,prob=c(0.2,0.2,0.2,0.4))
}
dd <- data.frame(a,b)
if (subset finds a vector) ( print that vector)
(else
2007 Sep 14
1
ISIN numbers into Bloomberg tickers
Hi R,
Can I convert ISIN numbers into Bloomberg tickers in the RBloomberg
package?
BR, Shubha
[[alternative HTML version deleted]]
2006 Jan 09
3
two y-axis in xy-plot
Hi there,
I am wondering if it is possible to do an xyplot with two y-axes. I'd like to print two parameters in a time series but they both have different scales.
Which parameter in xyplot can I add to achieve this result?
Thanks a lot for any help.
Antje
[[alternative HTML version deleted]]
2011 Mar 22
2
Play different voice-mail messages based on certain conditions
Hello List,
I have few installations out there based on 1.6.1 or above.
I'm trying to play different voice mail messages based on certain criteria's. For example, I want during office hours to play (in short): "we are not available to take your call, please leave a message", during off-hours and weekends I would play: "we are closed, our opening hours xx:xx-yy:yy, please
2011 Feb 11
2
fitdistr question
Hello,
I tried to fit a poisson distribution but looking at the function
fitdistr() it does not optimize lambda but simply estimates the mean
of the data and returns it as lambda. I'm a bit confused because I was
expecting an optimization of this parameter to gain a good fit...
If I would use mle() of stats4 package or mle2() of bbmle package, I
would have to write the function by myself
2006 Nov 01
4
extract values from a vector
Hello,
I'm looking for a solution for the following problem:
I have two vectors
V1 <- c("apple","honey","milk","bread","butter")
V2 <- c("bread","milk")
now, I would like to know for each element in V1 if it's equal to one of
the elements in V2
I could do:
which(V1 == V2[1] | V1 == V2[2])
but what if I
2009 Jan 20
5
from matrix to data.frame
Hello,
I have a question how to reshape a given matrix to a data frame.
# ----------------------------------
> a <- matrix(1:25, nrow=5)
> a
[,1] [,2] [,3] [,4] [,5]
[1,] 1 6 11 16 21
[2,] 2 7 12 17 22
[3,] 3 8 13 18 23
[4,] 4 9 14 19 24
[5,] 5 10 15 20 25
> colnames(a) <- LETTERS[1:5]
> rownames(a) <-
2007 Aug 01
1
need help with pdf-plot
Hello,
I'm trying to plot a set of barplots like a matrix (2 rows, 10 columns
from"reduced_mat") to a pdf. It works with the following parameters:
pdf("test.pdf",width=ncol(reduced_mat)*2, height=nrow(reduced_mat)*2, pointsize
= 12)
par(mfcol = c(nrow(reduced_mat),ncol(reduced_mat)), oma = c(0,0,0,0),
lwd=48/96, cex.axis = 0.5, las = 2, cex.main = 1.0)
The I get a
2009 Sep 28
2
Levelplot without margins
Hello,
I'm not very experienced with lattice and I was wondering whether I get
get some hints from you how to create a pure heatmap (using levelplot),
without any axis, title, legend, margin at all... I just want to see the
coloured squares, nothing else.
Any suggestions?
Antje
2016 Sep 13
4
[PATCH 12/15] Replace call of celt_inner_prod_c() (step 1)
Should call celt_inner_prod().
---
celt/bands.c | 7 ++++---
celt/bands.h | 2 +-
celt/celt_encoder.c | 6 +++---
celt/pitch.c | 2 +-
src/opus_multistream_encoder.c | 2 +-
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/celt/bands.c b/celt/bands.c
index bbe8a4c..1ab24aa 100644
--- a/celt/bands.c
+++ b/celt/bands.c
2008 Dec 05
6
levels update
Hello,
I hope this question is not too stupid. I would like to know how to update
levels after subsetting data from a data.frame.
df <- data.frame(factor(c("a","a","c","b","b")), c(4,5,6,7,8), c(9,1,2,3,4))
names(df) <- c("X1","X2","X3")
my.sub <- subset(df, X1 == "a" | X1 == "b")
2009 May 05
3
Heatmap without levelplot
Hi there,
as I'm not sure to understand the coloring levelplot uses, I'm looking for
another easy way to create a heatmap like this:
library(lattice)
mat <- matrix(seq(1,5, length.out = 12), nrow = 3)
mat[1,2] <- 3.5
my.at <- seq(0.5,5.5, length.out = 6)
my.col.regions <- rainbow(5)
graph <- levelplot(t(mat[nrow(mat):1, ] ), at = my.at, col.regions =
my.col.regions)
2008 May 23
2
Boxplot width
Hi there,
assume that you have data with different sampling like
d1 <- rnorm(100)
d2 <- rnorm(150)
now, I'd like to create two boxplots in one graph but each plot located at the
sampling number at the x-axis. This, I can do with "at"
l <- list(d1,d2)
boxplot(l, at=c(length(d1), length(d2)), xlim=c(0,200) )
but both plots are very thin and I'd like to increase the
2011 Nov 16
3
access sublists by a variable
Dear list,
I'd like to access the elements of a list within another list with the
help of a variable.
dict <- list( "24" = c(1,2,3,6,12,24,48,72,96,120,144,168,720),
"168" = c(1,12,24,48,72,96,120,144,168,336,504,672),
"8760" = c(1,24,168,730,4380,8760)
)
dict$"24" works fine, but
a <- "24"
dict$a
returns
2008 Nov 16
4
duplicate values
Hei R Users,
i have the following dataframe:
Datetime Temperature and many more collumns
1 2008-6-1 00:00:00 5
2 2008-6-1 02:00:00 5
3 2008-6-1 03:00:00 6
4 2008-6-1 03:00:00 0
5 2008-6-1 04:00:00 6
6 2008-6-1 04:00:00 0
7 2008-6-1 05:00:00 7
8 2008-6-1 06:00:00
2011 Feb 21
2
Console output
Hi there,
I though there has been a possibility to force the output on the
console with one element per line. Instead of this:
> 1:10
[1] 1 2 3 4 5 6 7 8 9 10
something like this
> 1:10
[1] 1
[2] 2
[3] 3
[4] 4
[5] 5
[6] 6
[7] 7
[8] 8
[9] 9
[10] 10
Can anybody help?
Antje
2008 Dec 02
3
boxplot via plot command
Hi folks,
I've just discovered that the following code leads to boxplot (surprisingly to me).
Can anybody explain to me why? Is this documented somewhere? I've never
consider this option before.
x <- rnorm(300)
l <- c(rep("label1",100), rep("label2",50), rep("label3",150))
df <- data.frame(as.factor(l), x)
plot(df)
Thank you!
Antje