Displaying 20 results from an estimated 20000 matches similar to: "Multiple plots in one window"
2011 Apr 14
2
How to see a R code from a package?
Dear R users,
Hi. I want know R code of a function: predict.cv.glmnet (which is
included in glmnet package).
Could you let me know how I can see the R code of the function?
Thank you,
Soyeon Kim
2010 Dec 13
2
How to change leaf color by group in hclust plot or how to install A2R package in windows?
I want to change leaf color by group in hclust plot.
I've seen several answers about A2R package but I cannot install A2R
and Rtools in windows.
Do you know how to install A2R package in windows or how to change
leaf color by group in hclust plot?
Thank you in advance,
Soyeon
2012 Dec 18
2
how to get a value from a list (using paste function)?
Dear my R friends,
I want to get a number from a list using paste function.
In my example,
lambda.rule <- "lambda.1se"
cvtest is a list (result from cv.glmnet)
and
cvtest$lambda.1se
[1] 1.308973
I want to call the value using paste function.
I used get function but there was an error.
test <- get(paste("cvtest$",lambda.rule, sep=""))
Error in
2010 Sep 20
2
how to seperate " "? or how to do regression on each variable when I have multiple variables?
Dear All,
I have data which contains 14 variables. And I have to regress one of
variables on each variable (simple 13 linear regressions)
I try to make a loop and store only R-squared
colnames(boston)
[1] "CRIM" "ZN" "INDUS" "CHAS" "NOX" "RM" "AGE"
[8] "DIS" "RAD"
2011 Apr 15
2
prediction error in ROCR package when sampled y consists of only one class
Dear R users,
Hi. I am using prediction function in ROCR package.
y consists of two classes 0 and 1.
However, since I am using cross-validation, a sampled small number of
y may consist of only one class
>y
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
In this case, prediction function gives an error:
Error in prediction(predic, y) : Number of classes is not equal to 2.
ROCR currently supports
2011 Aug 10
2
Opposite of paste function
Dear All,
I have vn variable
> vn
[1] "V300" "V376"
What I want to get is
300 376
without V and "" from vn variable.
Could you help me about this issue?
Thank you,
Soyeon
[[alternative HTML version deleted]]
2011 Jun 09
4
set.seed and for loop
Dear All,
This is hard to describe so I made a simple example.
set.seed(1001)
total <- 0
data <- vector("list", 30)
for(i in 1:30) {
data[[i]] <- runif(50)
}
Let's call a data set runif(50).
While the for loop is running, 100 data sets are generated.
I want to restore 23th data set (the data set generated in 23th for
loop) without the loop.
I've tried set.seed(1023)
2012 Sep 02
2
Impact of cex changing as a function of mfrow
R 2.15.1
OS X (MLion)
Colleagues,
I am aware that changes in mfrow / mfcol in par() affect cex (from help: In a layout with exactly two rows and columns the base value of ?"cex"? is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66).
I generate a multipage PDF in which mfrow varies such that cex is impacted. This affect
2012 Jul 04
2
How to generate a correlated binary data set?
Hi.
I am trying to generate a correlated binary data set.
I've tried to use mvtBinaryEP, binarySimCLF, and bindata packages but none
of them works in R version 2.15.1.
Do you know any package to generate correlated binary covariates and work
in R version 2.15.1, or how to generate it?
Thanks,
[[alternative HTML version deleted]]
2005 Feb 18
1
Contingency tables profiles
Thank for your help
I obtained profiles and I found mosaicplot as an interesting alternative.
I don't like my solution about legend in profiles graphics: I inserted empty
extra columns in order to avoid tue superimposed of legend.
#Data
N <- matrix(0,3,6)
N[1,] <- c(7,7,5,0,4,4)
N[2,] <- c(0,0,0,5,5,5)
N[3,] <- c(4,4,0,0,3,0)
rownames(N) <-
2006 Sep 28
3
complex plots using layout()
Dear r-help,
I am trying to plot several scatter plots with marginal histograms on
one page. Ideally, a page is equally divided into 4 figure regions.
Within each figure region, a scatter plot with marginal histograms will
be plotted.
I followed Dr. Paul Murrell's code released online to successfully plot
the scatter plot with marginal histograms. The code applies "layout()"
to
2010 Feb 18
2
problem with multiple plots (mfrow, mar)
Dear R-users,
I often stack plots that have the same x-axis. To save space and have
the plots themselves as large as possible I like to minimize the margins
between the plots to zero. I use the "mfrow" and "mar" parameters to
achieve this.
However, the different margin settings for the individual plots lead to
the inner plots being higher than the two outer plots. To make the
2012 Sep 27
3
Comparing density plots using same axes or same axes scale
Good Evening-
I have a set of nine scenarios I want to plot to see how the distribution
is changing, if one tail is getting larger in certain scenario, currently I
am using this code
colnames<-dimnames(sag_pdfs)[[2]]
par(mfrow=c(3,3))
for(i in 1:9) {
d<-density(sag[,i])
plot(d,type="n", main=colnames[i])
polygon(d,col="red",border="grey")}
where sag is
2011 Dec 21
2
unique combinations
Hi there,
I have a vector and would like to create a data frame, which contains
all unique combination of two elements, regardless of order.
myVec <- c(1,2,3)
what expand.grid does:
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
what I would like to have
1,1
1,2
1,3
2,2
2,3
3,3
Can anybody help?
2012 Apr 28
3
Exporting plots generated by a 'for' loop
Hello!
I have a 'for' loop that generates a plot with each iteration. I would
either like the plots to be stacked one below the other in a single
.jpg file or be stored in three different files with each file being
named dynamically. The following code is an illustration of my query
(but does not accomplish my aim):-
for (i in 1:4)
{
jpeg("samplo.jpg")
par(mfrow=c(3,1))
2000 May 01
1
tick marks on mfrow=c(3,3) plot
I am generating an array of similar plots using the par(mfrow=c(3,3))
method. Everything works fine except the plot only puts y-axis tick marks
on cells in column one and x-axis tick marks on cells in row three. I
would like tick marks on both the x and y axix of all 9 plots in my array.
I am generating plots using the following two functions
three.by.three.plot <- function(ss)
{
2010 Nov 03
3
Lattice plots for images
Hello UseRs,
I need help on how to plot several raster images (such as those obtained
from a kernel-smoothed intensity function) in a layout
such as that obtained from the lattice package. I would like to obtain
something such as obtained from using the "levelplot" or "xyplot"
in lattice. I currently use:
>par(mfrow=c(3,3)
to set the workspace, but the resulting plots
2006 Dec 27
3
stacked plots
Dear helpeRs,
Is there a better method of producing stacked charts than
par(mfrow(3,1)), plot(x), plot(y), plot(z)? What I would like to do is
produce a chart of several panes stacked vertically with no space
between them so they appeared to be a single figure. I've attached a
small example, though it is not clear that it will make it, as the
posting guide doesn't say which sort of images
2013 Sep 13
3
Problema con el tamaño de las letras en R en gráficos multiples
Hola buenas,
Actualmente me hayo haciendo unas gráficas que han de tener un tamaño de
letra determinado. Para ello empleo los parametros ps de las funciones
x11() y en par().
Mientras hago gráficas de uno y gráficas de dos plots todo va bien. Pego
las gráficas en power point y veo que las gráficas son del tamaño
recomendado (pego una caja de texto y compruebo que todo es correcto de
manera
2005 Mar 29
5
pairewise plots
Dear R users,
I have a data generated as the following,
dat <- data.frame(matrix(sample(24), nrow=4))
dimnames(dat) <-list(rownames=c('g1','g2','g3','g4'), colnames=c("A_CH1","A_CH2","B_CH1","B_CH2","C_CH3","C_CH3"))
» dat
A_CH1 A_CH2 B_CH1 B_CH2 C_CH3 C_CH3
g1 16 24 7 9 14