Displaying 20 results from an estimated 2000 matches similar to: "levelplot help needed"
2009 Jan 21
3
merging several dataframes from a list
Hi there,
I have a list of dataframes (generated by reading multiple files) and all
dataframes are comparable in dimension and column names. They also have a
common column, which, I'd like to use for merging. To give a simple example of
what I have:
df1 <- data.frame(c(LETTERS[1:5]), c(2,6,3,1,9))
names(df1) <- c("pos", "data")
df3 <- df2 <- df1
df2$data
2006 Aug 13
2
How to order or sort a data.frame
I have a dataframe where I would like to order first
by variable, year, and then within that variable by
month.
So far the only way that I have seen to do this is to
order by year and then subset year and sort by month
and then do an rbind to get things back together.
Is this the right approach?
Example:
us.state <-rep("California", 23)
2006 May 10
4
lattice package plots
I am using the lattice packge for its levelplot and contourplot. Is it
possible to adjust the line thickness of the 'box' and tickmarks in these
plots?
Thanks for the attention,
Matt Sundling
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
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)
2009 May 04
4
levelplot question
Hi there,
I have a question concerning the behaviour of the colouring with levelplot. (I
hope, I manage to explain)
If I give the parameters "at" and "col.regions" like this:
at <- c(1,2,3,4,5,6)
col.regions <- c("blue","blue","blue","yellow","yellow","yellow")
Which color would have the value 3.5?
I would
2009 Jan 26
2
heatmap with levelplot
Hi there,
I'd like to create a heatmap from my matrix with
a) a defined color range (lets say from yellow to red)
b) using striking colors above and below a certain threshold (above = "green",
below = "blue")
Example matrix (there should be a few outliers generated...) + simple levelplot
without outliers marked:
library(lattice)
my.mat <- matrix(rnorm(800), nrow =
2005 Apr 20
1
overlaying a contour line in a levelplot
Hello there,
I am creating a series of images using levelplot but I also want to
overlay a contour for a particular value as reference. Here is the
levelplot command for the image:
print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab=
NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T)
and then to add the contour plot (I only want a contour at level 5):
2012 Aug 09
2
Add interpunct (dot) symbol to axis label?
I'm having problems creating an axis label for a plot.
y_label = expression(paste(plain('CPUE
'),plain('(fish'),plain('x'),plain('h'^{-1}),plain(')')))
I'd like to replace the "x" with an interpunct symbol (dot). Any
suggestions how to do this?
Thanks in advance.
[[alternative HTML version deleted]]
2009 May 22
2
Scope problem?
I've just spent today trying to fix a Heisenbug...
this function returns a linear interpolator function:
interpOne <- function(xl,yl){
f = function(data){
t = (data-min(xl))/(max(xl)-min(xl))
return(min(yl)+t*(max(yl)-min(yl)))
}
return(f)
}
> k=interpOne(c(0,1),c(4,5))
> k(0.5)
[1] 4.5
and this function uses the above to return a function that returns a
piece-wise
2012 Oct 07
2
Reshape2, melt, order of categorical variable and ggplot2
Hello everyone,
I have the following data frame:
> df
V1 V2 V3
1 bench1_10 16675 16678
2 bench1_10 16585 16672
3 bench1_100 183924 185563
4 bench1_100 169310 184806
5 bench1_300 514430 516834
6 bench1_300 510743 514062
7 bench1_500 880146 877882
8 bench1_500 880146 857359
9 bench1_1k 880146 1589600
10 bench1_1k 880146 1709990
>
I'd like to
2001 Sep 10
1
data format for ppinit
After installation of R into VineLinux2.1.5, I started to enjoy statistics
following some instruction, and found it very useful.
One of my main purpose to use R is to try spatial statistics. Since
library named "spatial" has already installed, I just tried ...
> library(spatial)
> towns <- ppinit(test.dat)
------- test.dat -------
x,y
4,7
5,7
5,8
5,9
6,7
6,8
6,9
7,8
2005 Nov 08
1
[PATCH] build warnings in mdf.c
Hi
I just upgraded to http://svn.xiph.org/trunk/speex r10357
and got this build warning:
alfredh@io:$ make -s mdf.o
libspeex/mdf.c: In function 'speex_echo_cancel':
libspeex/mdf.c:321: warning: statement with no effect
libspeex/mdf.c:317: warning: `adapt_rate' might be used uninitialized in this function
Is this intentional? In any case here is a simple fix:
Index:
2002 Apr 19
1
FW: Problem compiling on HP-UX 10.20
Here is a copy of the last few lines in base-Ex.Rout.fail:
> x <- seq(3,500);yl <- c(-.3, .2)
> plot(x,x, ylim = yl, ylab="",type='n', main = "Bessel Functions
Y_nu(x)")
> for(nu in nus){xx <- x[x > .6*nu]; lines(xx,besselY(xx,nu=nu), col =
nu+2)}
> legend(300,-.08, leg=paste("nu=",nus), col = nus+2, lwd=1)
>
> x <-
2008 May 19
2
recoding data with loops
# I'm new to R and am trying to get the hang of how it handles
# dataframes & loops. If anyone can help me with some simple tasks,
# I'd be much obliged.
# First, i'd like to generate some random data in a dataframe
# to efficiently illustrate what I'm up to.
# let's say I have six variables as listed below (I really
# have hundreds, but a few will illustrate the point).
#
2007 Mar 01
1
compiling echo cancellation
dear all
I got this error when I try to use libspeex in visual studio. when I
include speex/speex_echo.h, it complains about unresolved external symbol
_speex_echo_state_init. And when I include mdf.c into the source, it
generates whole bunch of errors. Any idea? thanks so much
--------------------Configuration: audio - Win32 Debug--------------------
Compiling...
mdf.c
C:\Documents and
2005 Nov 07
1
Some problems with mdf.c
Hello...
I want to ask you something about your software implementation of MDF filter with DTD machanism.
(mdf.c speex_echo.h files)
My questions are:
1. What are theoretical (using in your articles) equivalents of index symbols from your program?
2. Could you describe or give me an algorith which was using during software implementation of the MDF+DTD
3. How I could freeze MDF by means of DTD
2006 Jan 19
1
Compile error (svn 10743)
Hi,
I've received svn 10743 revision.
But there are compile errors at three files with VS2005.
Please check these reports.
Sohn,
Platform system engineer.
=============================================================================
1. modes.c
- nb_mode_new()
SpeexNBMode * nb_mode;
nb_mode = (SpeexNBMode *) speex_alloc (sizeof (SpeexNBMode));
if (nb_mode == NULL) return NULL;
2007 Jul 13
2
trouble compiling Hmisc package
Hi:
We're trying to install the Hmisc package on a Solaris 9 machine.
Here's what we get:
R CMD INSTALL /usr/local/srctree/Hmisc_3.4-2.tar.gz
* Installing to library '/usr/local/lib/R/library'
* Installing *source* package 'Hmisc' ...
** libs
g95 -fPIC -g -O2 -c cidxcn.f -o cidxcn.o
g95 -fPIC -g -O2 -c cidxcp.f -o cidxcp.o
g95 -fPIC -g -O2 -c hoeffd.f -o
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All,
I would like to make an invitation to make a collective package with all
functions related to TABLES.
I know that there are many packages with these functions, the original idea is
collect all this functions and to make a single package, because is arduous for
the user know all this functions broadcast in many packages.
So, I think that the original packages can continue with its