Displaying 6 results from an estimated 6 matches for "1.5000000".
Did you mean:
1.000000
2003 Jun 12
3
breaks
Dear R People:
I have a question about a "sorting" problem, please.
I have a vector xx:
> xx
[1] -2.0 1.4 -1.2 -2.2 0.4 1.5 -2.2 0.2 -0.4 -0.9
and a vector of breaks:
> xx.y
[1] -2.2000000 -0.9666667 0.2666667 1.5000000
I want to produce another vector z which contains the number of the class
that each data point is in.
for instance, xx[1] is between xx.y[1] and
2006 Sep 17
2
histogram frequency weighing
Fellow R-helpers,
Suppose we create a histogram as follows (although it could be any vector
with zeroes in it):
R> lenh <- hist(iris$Sepal.Length, br=seq(4, 8, 0.05))
R> lenh$counts
[1] 0 0 0 0 0 1 0 3 0 1 0 4 0 2 0 5 0 6 0 10 0 9 0 4 0
[26] 1 0 6 0 7 0 6 0 8 0 7 0 3 0 6 0 6 0 4 0 9 0 7 0 5
[51] 0 2 0 8 0 3 0 4 0 1 0 1 0 3
2008 May 01
3
how to not sort factors when plotting
Hello,
When making a graph, plot and boxplot automatically sort my factor
levels (y axis) into alphabetical order. Is there a way to make it
NOT do this? I've tried:
sort.by="none", sorted=FALSE, sort=FALSE, reorder=FALSE.
Thank you.
2005 Oct 30
2
identity matrix
I found a very odd thing.
A matrix multiplied by its inverse matrix should be an
identity matrix.
But why the following thing happens?
<a%*%solve(a) is not an identity matrix>
> x%*%t(x)
[,1] [,2] [,3] [,4] [,5]
[1,] 108.16 58.24 32.24 66.56 225.68
[2,] 58.24 31.36 17.36 35.84 121.52
[3,] 32.24 17.36 9.61 19.84 67.27
[4,] 66.56 35.84 19.84 40.96 138.88
[5,]
2013 Mar 14
1
ggplot2 problem
Hello all!
I have a problem with ggplot2 library. I want to do an heat map and the y
variables are the year months. If I use the following code, he y values are
in alphabetical order, but I want it in month order.
The code is:
library(reshape)
library(ggplot2)
library(scales)
p <- ggplot(data.m, aes(variable, Month)) + geom_tile(aes(fill = value),
2008 Jul 09
1
Question regarding lu in package Matrix
Dear R-helpers,
I have a question regarding LU-decomposition with function lu in package
Matrix. The following simple example confuses me: Why is as.matrix(elu$U)
not an upper triangular matrix?
u3 <-
matrix(c(1,1,1,1,1,1,-1,1,0,0,0,0,0,-1,1,0,0,0,-1,0,1,0,0,0,0,0,-1,1,0,0),5,6,byrow=T)
elu <- expand(lu(Matrix(u3,sparse=F)))
as.matrix(elu$U)
I only have very limited experience with the