Displaying 20 results from an estimated 8842 matches for "col".
Did you mean:
cl
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? (ma...
2011 Sep 09
3
Read a list of files into named R data.frames
I have a collection of .csv files in a directory, and want to read them
into R data.frames whose names
are the same as the file names, without the .csv extension
e.g., from
> (files <- list.files(pattern="*.csv"))
[1] "Allstar.csv" "AllstarFull.csv"
[3] &qu...
2013 Sep 05
0
[LLVMdev] [ast-dump] Class template partial specializations missing from an implicit class template instantiation?
...};
int main() {
Outer<float>::Inner<int*> ii;
ii.f();
Outer<float>::Inner<int> i2;
i2.f();
}
The tree looks as expected for the template:
|-ClassTemplateDecl 0x38e1de0 <test-src/main.cpp:1:2, line:5:2> Outer
| |-TemplateTypeParmDecl 0x38e1ca0 <line:1:11, col:20> typename T
| |-CXXRecordDecl 0x38e1d50 <line:2:2, line:5:2> struct Outer definition
| | |-CXXRecordDecl 0x390eab0 <line:2:2, col:9> struct Outer
| | |-ClassTemplateDecl 0x390ec80 <line:3:4, col:51> Inner
| | | |-TemplateTypeParmDecl 0x390eb40 <col:13, col:22> typename...
2019 Jun 09
2
Strange local variable cv::VideoCapture allocated
...!curr_frame.empty();
}
Generated AST from ast-dump:
===========================
-CXXMethodDecl 0x7ff113148810 parent 0x7ff114400cb0 prev 0x7ff114401e30
<line:480:1, line:486:1> line:480:18 used readFileFrame 'bool (cv::Mat &,
int &)'
| |-ParmVarDecl 0x7ff113148708 <col:32, col:37> col:37 used curr_frame
'cv::Mat &'
| |-ParmVarDecl 0x7ff113148780 <col:49, col:54> col:54 used frame_id 'int &'
| `-CompoundStmt 0x7ff1131537d8 <col:64, line:486:1>
| |-UnaryOperator 0x7ff113148930 <line:482:5, col:7> 'int' lv...
2003 Jan 21
1
[R] proposal: lattice/levelplot: panel.catlevelplot
...y categorical data.
I append the proposed code and two examples:
- panel.catlevelplot()
- example1.catlevelplot.esoph()
- example2.catlevelplot.esoph()
Wolfram Fischer
#------ CODE --------------------------------------------------------------
panel.catlevelplot <- function (x, y, z, wx, wy, zcol, col.regions, subscripts
, ...
, z.factor.min = 0.02 # factor for z range expansion
# -> little cells become visible
, col.x = NULL # colors for categories in x direction
, col.y = NULL # colors for categories in y direction
, p...
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, 4),type="l",col="blue")
title(main = list(paste("Poison"),
????????????????????????? col="black", cex = 1.0))...
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", ref.grid = "yes", scale.max = 100), .Names =
c("shape",
"shape.col", "shape.lty", "cell.fi...
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"),
text=list(lab="Paul"),
lines=list(col="green"),
text=list(lab="George"),
lin...
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...(maptools) need to be called before calling the functions.
###plot.MFA2 Function
plot.MFA2<-
function (x, axes = c(1, 2), choix = "ind", ellipse = NULL, ellipse.par =
NULL,
lab.grpe = TRUE, lab.var = TRUE, lab.ind.moy = TRUE, lab.par = FALSE,
habillage = "ind", col.hab = NULL, invisible = NULL, partial = NULL,
lim.cos2.var = 0, chrono = FALSE, xlim = NULL, ylim = NULL,
cex = 1, title = NULL, palette = NULL, new.plot = TRUE, ...)
{
res.mfa <- x
if (!inherits(res.mfa, "MFA"))
stop("non convenient data")
if...
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(...
2010 Jul 23
2
decimal seperator
...t;- data.frame(cbind(sites, size))
newdata <- (sapply(subset(site_size, select=c("size")), as.numeric))
rownames(newdata) <- site_size$sites
library(grid)
plot(newdata, ylab =" ", xlab= " " , axes = FALSE)#, type="h", lwd=16)
points(newdata, cex = 10, col = topo.colors(20), bg=topo.colors(20), pch=22)
lines(newdata, type="h", lwd=40, col=topo.colors(20))
axis(1, at=seq(1, 20, by=1), labels = FALSE)
text(seq(1, 20, by=1), par("usr")[3] - 0.2, labels = site2_labels, srt = 45,
pos = 1, xpd = TRUE)
reg.txt <- as.character(c("...
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
--- matplot.new2 Tue Jan 13 18:16:49 1998
***************
*** 1,12 ****
###---- As S (just 'better' ...)
! matpoints <- function(x, y, lty=1:5, pch=...
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 tw...
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,] 102.4 92.3 72.2 199.2 201.1 218.9
[3,] 18.8 20.8 22.9 106.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.
Ho...
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 ="black",title.cex=1.4)
gives the following error (sorry in french):
Erreur dans legend("topleft", legend = legtext, col = col, text.col =
col, :
argument(s) inutilis?(s) (title.cex = 1...
2010 Jul 18
5
package "plotrix"
...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")
> legendg(0.5,0.8,c("one","two","three"),pch=list(1,2:3,4:6),
+ col=list(2,3:4,5:7))
Error: could not find function "legendg"
My problem with the regular R "legend" function is that I cannot indicate in the legend the line plotted by the command "abline"
Here is the code. Attached is the plot. Any suggestion is welcome. Thank you.
Ma...
2006 Nov 22
2
problems with garchFit
...ut when I play with it, I got another
question.
I plot skew normal with skew = 1 and a standard normal, they overlap
eachother, so I think they are the same. Skew = 1 means no skewness (I can
not find the paper defining the distribution).
library(fSeries)
curve(dsnorm(x, 0, 1, 1), -2, 2, add = F, col = 'red') #skew normal with
skew 1
curve(dnorm(x, 0, 1), -2, 2, add = T, col = 'blue') #normal
Then I try them as innovations,
#normal innovation
garch_norm <- garchFit(series = logr, include.mean = F)
#skew normal innovation
#this line do not include skew, so it got same resu...
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...
2010 Jan 28
2
NA Replacement by lowest value?
...ed 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 = min(col[col > 0])
col[col < 0] = (min.val / 10)
col # Column index
}))
I think this is how to start, but the NA replacement part doesn't work...
newMatrix = as.matrix(apply(oldMatrix, 2, function(col)...