similar to: Zoo panel function

Displaying 20 results from an estimated 200 matches similar to: "Zoo panel function"

2012 Jul 31
1
Ubuntu installation
I just followed the instructions on CRAN<http://cran.r-project.org/bin/linux/ubuntu/README> to install R on an Ubuntu instance. sudo apt-get install r-base Why does it install an old version of R? Can I install version 15.1? I changed my sources.list to be a current cran mirror. I believe that I have entered the URL correctly because at first I had it wrong (there was a trailing
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how to find the answer I want to recursively loop over an object and trim trailing white space. When I use this function on a list of data.frame I get output like this: [1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces \", \" many spaces
2010 Jul 15
2
replace negative numbers by smallest positive value in matrix
Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the loop I used. I would like to get suggestions on the "R way" to do this. Thanks, Juliet # example data set mymat <- structure(c(-0.503183609420937, 0.179063475173256, 0.130473004669938, -1.80825226960127, -0.794910626384209, 1.03857280868547,
2017 Jan 21
2
problema con grafico lattice ....
Hola, Por si lo quieres con colores rellenando cada punto: #---------------- library(data.table) library(lattice) dat <- read.table("pba.csv", header=TRUE, dec=",", as.is=TRUE) row.names(dat) <- NULL dat <- as.data.table(dat) dat$mycol <- ifelse(dat$sol =="ControlAE", "red", dat$sol) dat$mycol <- ifelse(dat$mycol
2007 Feb 04
3
Reference to dataframe and contents
This is probably easy for experienced users but I could not find a solution. I have several R scripts that process several columns of a dataframe (several dataframes and columns actually, but simplified for my question). References such as: myDF$myCol are all over. I like to automate this for other dataframes and columns by defining a reference only once in the beginning of the script. One
2011 Dec 05
2
barplot ignoring col parameter
Hi All, I'm having a problem with barplot: mydata [1,] 2 108 0 0 0 1 3 0 0 0 0 0 7 18 3 4 8 20 26 20 19 7 1 1 mycol = c(rep('yellow', 2), rep('white', 3), rep('orange',2), rep('white', 5), rep('orange',3), rep('red',9)) barplot(mydata, col = mycol) gives me an uniformly yellow barplot. How do I solve this? bw Federico
2007 Aug 06
3
Error in using nlevels in apply function
Dear R users, I am currently trying to create my first personnal function and use it with the apply function. The purpose of this function is to create a vector summarizing the number of levels in a given selection of data.frame columns. I tried to transpose the indexation method used by the nlevels function but it doesn't seem to work. I did not find anything uesful in the archives so
2011 Feb 25
1
speed up process
Dear users, I have a double for loop that does exactly what I want, but is quite slow. It is not so much with this simplified example, but IRL it is slow. Can anyone help me improve it? The data and code for foo_reg() are available at the end of the email; I preferred going directly into the problematic part. Here is the code (I tried to simplify it but I cannot do it too much or else it
2006 Aug 01
2
rgb and col2rgb color conversion/modification/shading
I want to get a lighter shade of a color...I have a lot of colored objects and want each one printed as a foreground against a slightly lighter background. I thought I could try something like changing the alpha channel by first converting it to rgb. But prior to trying that, I'm stuck with how to get the color after converting using col2rgb() to be interpreted again as a color, rather than
2013 Jan 12
3
heatmap.2 problem
Dear List, I'm trying to generate a simple heatmap that has each row and column separated by a black line. However, for some reason this only happens for the first and last color. The middle color in my colorpanel() command has an addition horizontal and vertical line that I would like to get rid off. Any suggestions? #my code below my.matrix <- cbind(func.1 =
2005 Jul 27
3
Asymmetric colors for heatmap
> Dear expeRts, > > Currently, my colors are as follows: > mycol <- > c("blue1","blue2","blue3","blue4","black","yellow4","yellow3","yellow2","y > ellow1") > heatmap(snp, Rowv=NA, Colv=NA, col=mycol) > > However, I would like to have the following colors: > bright blue ->
2010 Aug 21
1
lattice::xyplot() with one factor for points and another for lines
Hi: In lattice, how does one handle separate graphical behavior for two different factors? In the xyplot below, the objective is to use the levels of one factor to distinguish corresponding shapes and colors, and the levels of the other factor to perform level-wise loess smooths. # Illustrative data: d <- data.frame(time = rep(1:8, each = 6), val = rnorm(48), gp1 =
2010 Dec 12
4
legend not appearing in Word document
I need help with using graphics in Word 2007 that will later be converted into a pdf document.? I have tried several formats and found that?I get the best quality of graphics using .wmf, .eps format, but when I convert it to .pdf I get a bunch of lines across the figures.? I also tried .tiff and .png but they give me much lower quality.? The best quality that converts to pdf appears to be
2011 Jul 29
2
problems with image.plot()
Hi all, I used image.plot() to create a heat map of a matrix: as.matrix(read.table("Matrix.txt", sep="\t"))->x HeatBrk<-seq(5,25,2.5) MyCol= gray((7:0)/7) library(fields) image.plot(x, col=MyCol, breaks=HeatBrk, legend.shrink=0.3) dev.copy(device=pdf, file="HEAT4!.pdf", height=8, width=8) dev.off() There are a few things that I would like to do that I
2010 May 17
1
suggestions/improvements for recoding strategy
I am recoding some data. Many values that should be 1.5 are recorded as 1-2. Some example data and my solution is below. I am curious about better approaches or any other suggestions. Thanks! # example input data myData <- read.table(textConnection("id, v1, v2, v3 a,1,2,3 b,1-2,,3-4 c,,3,4"),header=TRUE,sep=",") closeAllConnections() # the first column is IDs so remove
2011 Aug 25
2
axes start at end of plot
Hello all, I used the following script to generate a plot, but when I try to place axes, the axes start at the end of my plot and continue off the plot; the attached image shows what happens when I try to generate axes. library(fields) as.matrix(read.table("Matrix.txt", sep="\t"))->x #the matrix is a square matrix measuring 104x104; it was too large to attach #on left:
2009 Nov 30
1
Plotting color.legend() outside of plot region
Dear List, I am trying to plot a color.legend() in the right outer margin of my device region. I have read multiple threads on the subject and still can't get it right. I have stolen an example from one of the threads to demonstrate my problem. I have extended the outer margin using par(oma()), and have used par(xpd=NA) to tell it to plot in the device region. I can get the legend to plot
2011 Aug 09
1
rgl how to plot a cylinder like arrow3d?
Dear List, I'm trying to draw vector in XYZ with rgl under use of a cylinder3d. Therefore I scale and rotate a basis-cylinder). However, somehow the rotation is wrong as verified by overplotting arrow3d(). Where is my mistake? library(heplots) library(rgl) # ... 2 vectors data=data.frame(row.names=c('X','Y','Z'), x1=c(2,1,5),y=c(4,3,2))
2009 Aug 27
3
Merge data frames but with a twist.
Dear all, Question: How to merge two data frames such that new column are added in a particular way? I'm not actually sure how to best articulate my question to be honest, so i hope showing you what I want to achieve will communicate my question better. Lets say I have two data frames: > DF1 <- data.frame(cbind(Show=c('Firefly', 'Red Dwarf'), Measure=1:2,
2013 Feb 11
1
Putting an array from excel into R Studio
Dear All, I have been using RExcel for some time and find two features especially useful: i) The ability to select part of a worksheet and put it into R ii) The way of viewing the code, the output and the alerts in separate panes. The rest of R Excel I don't really use. The major benefit for me is i) as I can use the excel as a sort of fast access database which is convenient to edit. I can