Displaying 20 results from an estimated 5000 matches similar to: "rle for non concecutive"
2011 Dec 09
3
ggplot with geom_tile
Dear R-users,
I am trying to make a plot with ggplot-geom_tile(), but cannot remove some unwanted (white) lines through my plot.
Below a reproducible example:
#####
library(ggplot2)
tot=as.data.frame(rep(seq(-50,50,5),each=21))
names(tot)="precip"
temp=rep(seq(-5,5,0.5),21)
tot$temp=temp
disc=array(dim=c(21,21))
for(i in 1:21){
for(y in 1:21){
temp<-
2011 Oct 31
2
3 Overlayed simple plots
Dear all,
I am plotting 3 plots into the same x and y axis.
I want the first one to be painted red with a continuous line
The second one green with a continuous line
and the third one blue with a continuous line
plot(max_power(data),ylim=c(-120,-20))
par(new=T)
plot(min_power(data),ylim=c(-120,-20))
par(new=T)
plot(mean_power(data),ylim=c(-120,-20))
par(new=F)
Is it also a
2011 Sep 30
2
ggplot2 - extracting values of smooth
Suppose that I'm working on Hadley's diamond dataset and I want to
review the relationship between price, colour and carat.
I might run the following:
library(ggplot2)
#plot scatter and add some hex binning
q<-qplot(carat,price,data=diamonds, geom=c("hex"),
main="Variability of Diamond Prices by Carat and Colour")
#facet to get one scatter for
2011 Oct 06
1
apply and functions with many arguments
Dear all,
I would like to use the following function
fitdist(data, distr, method=c("mle", "mme", "qme", "mge"),
start=NULL, fix.arg=NULL, ...)
for many different distr values like distr=c("norm","lnorm","pois") (just a small example)
and take back into a list the parameter name which is what is inside distr plus what the
2012 Feb 06
1
R enterprise for linux
Dear all,
I would like to ask you if it would be possible to install R enterprise in opensuse.
Actually it seems that there are only Red Hat packages and I was wondering if their source code is available so one to try and compile it.
I would like to thank you in advance for your reply
Regards
Alex
[[alternative HTML version deleted]]
2011 Aug 10
3
plot 3d info in 2d
Hi Listers,
Is it possible to produce an ordination plot in 2d, where bubbles represent
the location of sites (this part is easy enough) and the size of the bubbles
is proportional to the sites location in 3d space (I am stuck on this
option). So sites that are very near the 2d plane of the xy axes would be
larger while sites that are actually further away in 3 d space would be
proportionally
2011 Aug 30
1
algorithm to merge same entries in a matrix
Hi,
I have the following, rather unorthodox problem:
I have a matrix that looks like this:
m1 <- matrix(c('a','b','d',NA,'c','c'), 2,3, byrow=TRUE)
[,1] [,2] [,3]
[1,] "a" "b" "d"
[2,] NA "c" "c"
now I would like to transform this matrix into this matrix:
[,1] [,2] [,3]
2011 Aug 24
3
ddply from plyr package - any alternatives?
Hello everyone,
I was asked to repost this again, sorry for any inconvenience.
I'm looking replacement for ddply function from plyr package.
Function allows to apply function by category stored in any column/columns.
Regular loops or lapplys slow down greatly because my unique combination
count exceeds 9000. Is there any available solution which allow me to apply
function by category?
2011 Sep 09
2
prcomp: results with reversed sign in output?
Dear All,
when I'm running a PCA with
prcomp(USArrests, scale = TRUE)
I get the right principal components, but with the wrong sign infront
Rotation:
PC1 PC2 PC3 PC4
Murder 0.5358995 -0.4181809 0.3412327 0.64922780
Assault 0.5831836 -0.1879856 0.2681484 -0.74340748
UrbanPop 0.2781909 0.8728062 0.3780158 0.13387773
Rape 0.5434321 0.1673186 -0.8177779 0.08902432
instead of
PC1 PC2 PC3 PC4
2011 Nov 18
2
libpng warning: Application built with libpng-1.2.26 but running with 1.5.2
Hi,
I have a problem on my mac when trying in R to produce png images.
I am getting this warnings with the ArrayQualityMetrics package:
> arrayQualityMetrics(rma_fatBody, outdir="normData", force =T)
The report will be written into directory 'normData'.
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
(loaded the KernSmooth namespace)
libpng warning: Application built
2011 Dec 02
1
R2Cuba package, failed with message ‘Dimension out of range’
Hi All,
I get the message failed with message ‘Dimension out of range’ when using
cuhre in package R2Cuba. Does anyone know what this mean? Or would I need
to email the package author?
The funny thing is it does give a result and comparing it to
"adaptIntegrate" in package cubature, the two numbers are very close.
Thanks,
Sachin
[[alternative HTML version deleted]]
2011 Oct 04
1
Problems loading package hydroTSM
Hello
I have the following problem when loading the package hydroGOF on Windows 7
running R.12.2
library(hydroGOF)
Error : package 'hydroTSM' does not have a name space
Error: package/namespace load failed for 'hydroGOF'
The same command does not result in error on R.13.1 at my Mac running Lion.
Have I done something wrong?
Many thanks
Ed
2011 Oct 27
1
Fitting Maximums of data series with cubic spline
Hi Users,
I want to fit the maximums of a data series with a cubic spline. How do I
go about this in R.
I failed to figure out how I can use the mgcv library to do this.
Thanks
----------------------------
ZABLONE
2011 Sep 05
1
ggplot2-grid/viewport and PNG
Dear All,
The following code save my graphs as pdf:
pdf("j:/mix.pdf", width = 18, height = 16)
grid.newpage()
pushViewport(viewport(layout = grid.layout(3,1)))
vplayout <- function(x, y)
viewport(layout.pos.row = x, layout.pos.col = y)
print(Aplot, vp = vplayout(1, 1))
print(Bplot, vp = vplayout(2, 1))
print(Cplot, vp = vplayout(3, 1))
dev.off()
How can I save it in
2011 Sep 06
1
How do I define moving window fequency
Hi list
I want to define a moving window based on ferquency in a grid file.
is there a package for this? I found packages for moving window mean, median or quantile.
thanks
[[alternative HTML version deleted]]
2011 Sep 17
1
£50 for help in my masters dissertation kalman filter forecasting
Dear R users,
Just to clarify. I am not offering to pay someone to do my Dissertation.
These 4-5 commands on Kalman Filter would be only a tiny part of my 10,000
words dissertation. A part that even after trying for a few days, I am still
stuck on. I am offering ?50, just to say thanks.
Regards
--
View this message in context:
2011 Feb 22
2
Regarding Savitzky-Golay Smoothing Filter
Hi
When we use the sav_gol command in R , it shows an error which says: "
error in as.matrix". We've downloaded the necessary packages. Kindly
help us with this issue. If there is any other function to perform
Savitzky-Golay smoothing in R, please let me know.
With Regards
Reynolds
2011 Apr 08
1
Is function compiled code or not?
Hi,
Sorry for my ignorance, but how can I see if a function is 'compiled code' or plain R? E.g. the daisy
function from the cluster package.
2011 May 24
1
references in R
Hi everybody,
my problem is the following: I have a function which produces for an
input number a dataframe with a fixed number of columns and 0 to 10
rows.
Now i want to apply this function to a vector with different inputs and
merge all these result-dataframes in one data.frame.
Can i give a data.frame-reference to the function, so that the result of
the function is not returned but appended
2011 Jul 19
1
urgent Help needed
Dear Sir,
Please help me to open my rda files. It's urgent to see the content and even
if I looked for solutions i didn't find one.
When I try to load my .rda file I receive this message:
"R> load(file = "SpecPhantomExp2WaterSupp Set2.rda")
Error: bad restore file magic number (file may be corrupted) -- no data
loaded
In addition: Warning message:
file