Displaying 20 results from an estimated 4000 matches similar to: "duplicate values"
2008 Dec 03
2
Switch language
Hi there,
I've installed R somewhen in German but I'd like to have it in English. The
installation of a new version does not change the language setting though I
think I've chosen "English" in the installation process (this choice was
available, right?).
Can anybody give me a hint?
(Error-Messages in German are not easy to get a solution for...)
Antje
2008 Sep 11
1
Probably very simple... call a number and play a sound?
Hey hey...
I'd like to create a new feature code in asterisk so when a user dials...
say... *00, it would then call some other extensions and play a sound file
to them.
So far, this is what I have...
[testing-custom]
exten => *00,1,Wait(1)
exten => *00,2,Playback(beep)
exten => *00,3,Playback(beep)
exten => *00,4,AGI(festival-script.pl|I will now attempt the call)
exten =>
2002 Dec 22
1
weird stat()
hei everyone,
I have a weird problem: if I do a
# cd /somedir; stat somesubdir |grep Modify
where /somedir is some directory on an SMB-mounted filesystem I get one
datetime... but I I do:
# cd /somedir; stat * |grep Modify
for the same directory I get a Modify time which consistently differs by 1
second. As I'm writing a perl module to detect differences in a filesystem
and rely on the
2012 Nov 08
2
How to include CI in a grouped barplot?
Hello everyone!
I need to include the confidence interval bar in a grouped barplot. I've
found some options on the web, but none of them solved my problem.
The question is: my barplot was created using vectors for each pair of bar
and them combining them using cbind.
I mean:
a=c(10,15)
b=c(20,24)
c=c(21,23) ...
hei=cbind(a,b,c)
graph1=barplot(hei, beside=T,...)
I've tried to include
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]]
2008 Dec 16
6
Find all numbers in a certain interval
Hi all,
I'd like to know, if I can solve this with a shorter command:
a <- rnorm(100)
which(a > -0.5 & a < 0.5)
# would give me all indices of numbers greater than -0.5 and smaller than +0.5
I have something similar with a dataframe and it produces sometimes quite long
commands...
I'd like to have something like:
which(within.interval(a, -0.5, 0.5))
Is there anything I
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) <-
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
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")
2008 Dec 02
5
Problem with extend rails(add new function in lib)
I do things below:
In lib/translater.rb
class Translater
require "rubygems"
require "rmmseg"
include "RMMSeg"
...
def segment(text)
RMMSeg::segment(text)
end
end
in helper/xx/xxx.rb
module xx
require "translater.rb"
def translate(text)
Translater.run(text)
end
end
when i use helper method tranlate, erros:
undefined method
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
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
2005 Nov 21
3
Comparing rows of matrices with different dimensions
Hi there,
I have a question, which I thought is very easy to solve, but somehow I can't find a solution. Probably someone could help me quickly?
Here it is:
I have two matrices:
a
[,1] [,2] [,3]
[1,] 1 4 9
[2,] 2 6 10
[3,] 3 6 11
[4,] 4 8 12
b
[,1] [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6
Now I want to find
2008 Sep 07
4
XML - get node by name
Hi there,
I try to rewrite some Java-code with R. It deals with reading XML files. I
started with the XML package. In Java, I had a very useful method which gave me
a node by using:
name of the node
index of appearance
start point: global (false) / local (true)
So, I could do something like this.
setCurrentChildNode("data", 0);
getValueOfElement("val",1,true);
-->
2008 Sep 01
3
another histogram question
Hi there,
I hope this question is not as stupid as the one before ...
I tried to shorten my histogram (because the distribution is quite skewed and I
simply don't want to see the long tail but still use the histogram plot). How
can I do something like this? (The example does not work but I don't know why...)
data <- rnorm(100) # as example, of course this is not skewed...
h <-