search for: cols

Displaying 20 results from an estimated 8792 matches for "cols".

Did you mean: cls
2000 Jun 28
2
Colour depth reduced to 12 by bitmap devices
I am using R to create colour plots as bitmap files. I have created a palette of 256 colours that I want to use, but the resultant output files contain only 12 colours used in dither patterns. The result is the same whether I use bmp() or png(). How can I get the true colours that I specified instead of dither patterns? (making the driver's job easier!) I am using R 1.1.0 for Windows
2011 Sep 09
3
Read a list of files into named R data.frames
...'t create the R objects in the global environment. What is missing here? for (i in 1:length(files)) { inp <- read.csv(file=files[i], header=TRUE) name <- sub(".csv", "", files[i]) cat("Read ", files[i], "\trows: ", nrow(inp), " cols: ", ncol(inp), "\n") eval(paste(name, "<- inp")) } Read Allstar.csv rows: 4475 cols: 3 Read AllstarFull.csv rows: 4676 cols: 8 Read Appearances.csv rows: 94157 cols: 20 Read AwardsManagers.csv rows: 57 cols: 6 Read AwardsPlayers.c...
2013 Sep 05
0
[LLVMdev] [ast-dump] Class template partial specializations missing from an implicit class template instantiation?
I was looking at the ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember documentation, in the included example it says: "(..) the instantiation of Outer<float>::Inner<int*> will end up instantiating the partial specialization Outer<float>::Inner<U*> (...)". To understand the concept better, I dumped the AST for the following code:
2019 Jun 09
2
Strange local variable cv::VideoCapture allocated
Hi I am using clang-6 to compile this C++ code and I see a strange temporary variable allocated at expression address 0x7ff1131536e8. If I change the ternary operator at line 483 to an if-else, the temporary is not allocated. Thanks Variables: ========= FFMPEGVideoCapture ffmpeg_video_capture_; cv::VideoCapture opencv_video_capture_; Function: ======== bool
2003 Jan 21
1
[R] proposal: lattice/levelplot: panel.catlevelplot
I suggest to add a panel function to levelplot (or perhaps to an other 3d lattice function) which is able to translate the z values into the size of the rectangles. It could be used to display categorical data. I append the proposed code and two examples: - panel.catlevelplot() - example1.catlevelplot.esoph() - example2.catlevelplot.esoph() Wolfram Fischer #------ CODE
2009 Nov 20
6
How to add a top level title to multiple plots
How can I add an overall plot title to these four plots? I would like to have something that says, "Distribution Comparisons": par(mfrow = c(2, 2)) # Plot 1 plot(rnorm(10),type="l",col="red") title(main = list(paste("Normal"), ????????????????????????? col="black", cex = 1.0)) # Plot 2 plot(rpois(10,
2008 Jul 23
6
Convert list of lists <--> data frame
For a function that takes an argument as a list of lists of parameters, I'd like to be able to convert that to a data.frame and vice versa, but can't quite figure out how. pats <- list(structure(list(shape = 0, shape.col = "black", shape.lty = 1, cell.fill = "white", back.fill = "white", label = 1, label.size = 1, ref.col = "gray80",
2005 Apr 14
2
Legend in xyplot two columns
Dear R-Help I have some trouble to set the legend in a xyplot into two rows. The code below gives me the legend in the layout I am looking for, I just rather have it in two rows. library(lattice) schluessel <- list( points=list( col="red", pch=19, cex=0.5 ), text=list(lab="John"), lines=list(col="blue"),
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
###Dear R users ###I have been using SensoMineR package from CRAN for most of my work in sensory data analysis and from my usage experience, I encountered some areas for improvement and considered ###modifying the function in SensoMineR package for my personal use. I felt that it could be useful to share this to the community for enabling adoption by other users where they might require a
2015 Apr 23
2
[LLVMdev] Get precise line/column debug info from LLVM IR
I am trying to locate instructions in an LLVM Pass by line and column number (reported by an third-party tool) to instrument them. To achieve this, I am compiling my source files with `clang -g -O0 -emit-llvm` and looking for the information in the metadata using this code: const DebugLoc &location = instruction->getDebugLoc(); // location.getLine() // location.getCol()
2010 Jul 23
2
decimal seperator
Hi R-List, I have a question regarding R-language formats, I think. I am producing a series of graphs (using plot, barplot, barchart, and bwplot, using either text or mtext to place values on the graphs) and tables for a Francophone country. In fact, I have already done so. However, while they are pleased with the results they've requested I convert all of my decimal points into the French
1998 Jan 16
0
matplot
matplot doesn't seem to pass through options like lwd, cex, etc. quite the way I'd like. I've thought of two ways to fix this, I don't know which is better. The first is to treat lwd, cex, etc., exactly like the other options (col, lty ...) -- (these diffs are long, skip down two pages if you want to see the other way) *** matplot.orig Tue Jan 13 18:17:54 1998 ---
2009 Jul 15
4
Change data frame column names
Hi R helpers, I have a data frame and I want to change the column names to names I have held in another data frame, but I am having difficulty. All data framnes are large so i can't input manually. Below is what i have tried so far: df<-data.frame(a=1:5, b=2:6, d=3:7, e=4:8) coltitles<-data.frame(v1="col number one", v2="col number two", v3="col number
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
Hello, R experts, I have a list called dataHP which has 30 elements (m1, m2, ..., m30). Each element is a 7x6 matrix holding yield data from two factors experimental design, with treatment in column, position in row. For instance, the element 20 is: dataHP[[20]] col1 col2 col3 trt1 trt2 trt3 [1,] 22.0 20.3 29.7 63.3 78.5 76.4 [2,]
2012 Dec 11
5
Renaming column names according to another dataframe
Hi, I've got a dataframe having a code as column name. Addtionally I have another dataframe with a two columns (and lots of rows), the first containing the code and the second some Text (real name). Now I'd like to use the information (pairs of code and name) of the second dataframe to rename all the columnnames in the first dataframe. How is it possible to achieve that? Here a small
2011 Apr 29
3
Change the text size of the title in a legend of a R plot.
Hello, Is it possible to change the text size of the title in a legend of a R plot? I tried to directly change the title.cex argument but it seems not to work. Trying : Horizo <- c(1,2,6,10,20) legtext <- paste(Horizo,sep="") legend("topleft", legend=legtext,col=col,text.col=col,lwd=lwd, lty=lty,cex=1.1,ncol=3,title = "Horizons",title.col
2010 Jul 18
5
package "plotrix"
I installed package plotrix because reading its vignette it looks like it can help me solve a "legend" problem. The package instaleed correctly on my Mac OS/X 10.5.8 But I cannot reproduce the examples centered on function "lgendg". > library(plotrix) > plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1),type="n", + main="Test of grouped legend function") >
2006 Nov 22
2
problems with garchFit
Hi all, I post it on both r-help and r-finance since I don't know where is most appropriate for this topic. Sorry if it bothers you. I did garch fitting on S&P500 monthly returns with garchFit from fSeries. I got same coefficients from all cond.dist except normal. I thought that is probabaly usual for the data. But when I play with it, I got another question. I plot skew normal with
2011 Dec 11
2
as.factor does not work inside function
Hi, I am trying to write a function do cast columns of data frame as factor in a loop, the source is : as.factor.loop <- function(df, cols){ if (!is.null(df) && !is.null(cols) && length(cols) > 0) { for(col in cols) { df[[col]] <- as.factor(df[[col]]) } } } source('D:/ambertuil.r') x <- 1:5 y <- 2:6 df <- data.frame(x=x, y=y) as.factor.loop(df, c("x")) But after the fu...
2010 Jan 28
2
NA Replacement by lowest value?
Hi all, I need to replace missing values in a matrix by 10 % of the lowest available value in the matrix. I've got a function I've used earlier to replace negative values by the lowest value, in a data frame, but I'm not sure how to modify it... nonNeg = as.data.frame(apply(orig.df, 2, function(col) # Change negative values to a small value, close to zero { min.val =