Displaying 20 results from an estimated 600 matches similar to: "Adding lines to scatterplot odd result when creating multiple plots"
2011 Jun 21
2
par code help
I am making a barplot using barplot2 from gplots where each bar
represents a specific tree species. I have formatted the species names
on the x-axis so that the genus name is above the species name and
have then rotated the labels 45 degrees to save room. This is my code:
>columncolor<-c("grey20", "grey20", "grey20", "grey70",
2005 May 12
1
pls -- crossval vs plsr(..., CV=TRUE)
Hi,
Newbie question about the pls package.
Setup:
Mac OS 10.3.9
R: Aqua GUI 1.01, v 2.0.1
I want to get R^2 and Q^2 (LOO and Leave-10-Out) values for each
component for my model.
I was running into a few problems so I played with the example a little
and the results do not match up with the comments
in the help pages.
$ library(pls)
$ data(NIR)
$ testing.plsNOCV <- plsr(y ~ X, 6, data =
2003 Apr 25
2
Apparent namespace problem
I'm seeing some strange behavior while using the snow package for
networked computers. I believe it's caused by name space resolution
issues, and would appreciate any suggestions tracking it down.
First, is there a way to find out what frame (as in frames in
environments, not data frames) a name is being obtained from or put
into?
Second, how closely does the evaluation environment in
2003 May 22
1
Possible R CMD check problem (PR#3070)
Using R 1.7.0 I get
* checking parcv-manual.tex ... ERROR
Could not create DVI version.
Although there is no apparent error. The dvi file exists.
Possibly there is some problem with my TeX setup, but the following
messages don't suggest that either.
Here's the full log, which does show some documentation issues:
sheep:~$R CMD check --library=.R/library/ src/parcv
* checking for working
2008 Nov 14
0
Cross-validation
Hi,
I was trying to do cross-validation using the crossval function (bootstrap package), with the following code:
---------------------------------------------------------------------------------------------------------
theta.fit <- function(x,y){
model <- svm(x,y,kernel = "linear")
}
theta.predict <- function(fit,x){
prediction <- predict(fit,x)
2001 Mar 07
1
cross-validation
The function crossval (in library bootstrap)
works well for the first degree polynomial model,
but in the case of the second degree model I got
an error message (see below).
I would be very greatfull if somebody could
give some advices for the following:
> library(bootstrap)
>
> x<-c(22,23.4,24.9,28.5,29.8,31.6,34.2,36.4,37.7,39)
>
2012 Feb 01
3
Plotting bar graph over a geographical map
Hi,
I am looking for a way to plot bar on a map instead of the standard points.
I have been using ggplot2 and maps libraries.
The points are added with the function geom_point. I know that there is a
function
geom_bar but I can't figure out how to use it.
Thank you for your help,
Simon
### R-code
library(ggplot2)
library(maps)
measurements <-
2001 Jun 28
0
: k-fold cross validation for fda,mda etc
Hi all,
Has anyone tried to do k-fold cross validation for flexible discriminant
analysis ( mda library), for example, using crossval() in bootstrap?
The problem is that the function crossval() requires a separate matrix
for predictors and another for responses, whereas the function fda(),
using the formula argument only.
Is there another way of doing k-fold cross validation for functions
which
2011 Oct 26
1
Using abline in lattice
Dear all,
being a relative beginner in R, I apologize for posting the second question
within two days.
So I want a stacked barchart, which should look like the one produced by
this code:
Tuvalu <- c(9,3,4,0,3,0,0)
Singapor <- c(38,0,0,0,12,19,0)
Samoa <- c(26,16,2,0,5,2,0)
PNG <- c(56,4,0,5,2,0,56)
Micronesia <- c(6,0,0,0,0,0,0)
graph4 <-
2012 Dec 12
1
Problems with plot maps
Hello,
I need plot map using ggplot()
I use such code:
library("ggplot2")
library(cshapes)
cshp.data <- cshp()
map <- cshp.data[cshp.data$COWCODE==369,]
map_mp<- list(
geom_polygon(aes(long, lat, group = group), data = map, fill = "grey70",
colour = "grey60", inherit.aes = FALSE, show_guide = FALSE),
scale_x_continuous("",
2010 Apr 24
2
barplot - offsetting individual bars
Hello,
I'm trying currently using barplot to summarize precipitation data. So far
I've compiled total annual snow and rain accumulation in a table
(attached). I've been successful at plotting it using the following code:
fig=barplot(t(Annual_Precip_table), horiz=TRUE, space=0, col=c("grey70",
"white"), axes=FALSE)
.
.
The result is a stacked barplot with total
2003 Aug 27
1
How to do leave-n-out cross validation in R?
Seems crossval from library(bootstrap) can only be
used for leave-one-out and k-fold cross validation?
Here is a dumb question, suppose n=80, how to do
exactly leave-50-out cross validation? K-fold cross
validation is not eligible for this case since
n/ngroup is not an integer. Thanks!
2020 Jul 28
2
Superponer mapas en ggplot
Buenos días. Tengo dos mapas que hago con ggplot (abajo) y necesito
superponer el 2º al 1º. En el 1º se representa la variable PA, binomial (0,
1), en gris, y en el 2º la variable ExtTG7085, que es numérica y va de 0 a
200. La 2ª es un gradiente en rojo. Lo ideal sería que donde coinciden el
rojo de la 2ª se viera más oscuro, pero supongo que eso no es fácil. Podría
también ser en otro color, pero
2004 Dec 03
1
organising the display in Trellis plots
Hallo,
I would like to organise at my pleasure the layout of a trellis plot.
Currently I have a 3x3 matrix display and 7 plots. Is it possible to
choose which specific panels will stay empty?
I tried index.perm to arrange the order. Then there is perm.cond which I
could not understand if it can serve for my purpose since I cant really
find which kind of data it accepts.
Thank you for the help.
2011 Feb 22
1
Transfer function observed vs predicted values graph problem
Hi,
I am trying to make a palaeoenvironmental transfer function using the R
package rioja that predicts the water-table (measured as depth to the water
table) of an area given the testate amoebae that are found there. I've
carried out weighted averaging of the data and am trying to produce a graph
that shows the observed water-table versues the model's predicted values.
Following the
2013 Mar 02
2
caret pls model statistics
Greetings,
I have been exploring the use of the caret package to conduct some plsda
modeling. Previously, I have come across methods that result in a R2 and
Q2 for the model. Using the 'iris' data set, I wanted to see if I could
accomplish this with the caret package. I use the following code:
library(caret)
data(iris)
#needed to convert to numeric in order to do regression
#I
1999 Apr 08
0
Problems installing packages in FreeBSD 2.2.8 and R-0.62.2
I am having some problems adding packages under
FreeBSD 2.2.8 and R-0.62.2
I have included the output of "uname -a" below first:
==
FreeBSD stiegl.niksun.com 2.2.8-RELEASE FreeBSD 2.2.8-RELEASE #0: Thu Dec
10 10:29:07 EST 1998 ath at stiegl.niksun.com:/scratch/obj/compile/STIEGL
i386
==
The CC in use is gcc (not egcs). The install failed as follows:
==
stiegl> R INSTALL
2017 Aug 16
1
Bias-corrected percentile confidence intervals
Hi folks,
I'm trying to estimate bias-corrected percentile (BCP) confidence
intervals on a vector from a simple for loop used for resampling. I am
attempting to follow steps in Manly, B. 1998. Randomization, bootstrap
and monte carlo methods in biology. 2nd edition., p. 48. PDF of the
approach/steps should be available here:
https://wyocoopunit.box.com/s/9vm4vgmbx5h7um809bvg6u7wr392v6i9
If
2020 Oct 23
0
How to shade area between lines in ggplot2
Hi
What about something like
p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2],
ymax = slope_1*x + intercept_1 + 1/w[2], fill = "grey70", alpha=0.1))
Cheers
Petr
> -----Original Message-----
> From: Luigi Marongiu <marongiu.luigi at gmail.com>
> Sent: Friday, October 23, 2020 11:11 AM
> To: PIKAL Petr <petr.pikal at precheza.cz>
> Cc: r-help
2016 Apr 09
1
Run script R
hi all ,?
i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:-----------------------------------------
Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values