Thank you Barry
--
View this message in context:
http://r.789695.n4.nabble.com/Reading-in-aux-ESRI-raster-files-into-R-tp2553544p2715015.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Hi all,
Please can you help me to add text to a plot.
I would like 5 graphical plots and 1 text plot. I use
par(mfrow=c(2,3))
then
textplot()
I would like to add various pieces of information to the text plot,
i.e. some individual values, a table of statistics, some sentences.
Is there any
Hi, Duncan Murdoch...
i m facing same pro here..
n i m a very new user for R...
i m just start using it now for my final year project...
i wan to know how to run outside R???
i have no idea about it...
can u help me???
appreciate for your helping...
--
View this message in context:
Hi
I noticed that nobody answered your question yet so here is my try.
If you want to see what objects are in your environment you can use ls()
but its output is only names of objects. Here is a function I use a long
time for checking what objects are there, their type, size and possibly
rows
Have a look at
?textplot
From the
gplots
package:
http://cran.r-project.org/web/packages/gplots/index.html
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) |
Thanks for the help, I start to get reasonable errors on the model...
I finally turned to the simpler lm() fitting. As my data from which I fit
has only 8 points in each case, I guess it does not make much sense to
downweight outliers and use rlm() in this case.
--
View this message in
As this forum proved to be very helpful, I got another question...
I'd like to fit data points on which I have an error, dx and dy, on each x
and y. What would be the common procedure to fit this data by a linear model
taking into account uncertainty on each point? Would weighting each point by
Thanks Phil, very helpful and works as advertised.
Any thoughts on the second question?
(P.S. for anyone digging this up in the future, there's a comma missing after
the formula in lm())
On 24 Sep 2010, at 18:16, Phil Spector wrote:
Michael -
You're doing too much work half the time,
Dear All
I want to store matrix in an array
Suppose s-array(0,4)
for(i in 1:4)
s[i] - read_matrix(a,2,2)
But the error - number of items to replace is not a multiple of replacement
length.
Can you suggest me any alternative method for storing a matrix in an array.
Thanks In advance.
Kind Regards
On Mon, 27 Sep 2010 11:12:26 +0100
wesley mathew wesleycmat...@gmail.com wrote:
Dear All
I want to store matrix in an array
Suppose s-array(0,4)
for(i in 1:4)
s[i] - read_matrix(a,2,2)
But the error - number of items to replace is not a multiple of
replacement
length.
Can you suggest
Hi Wesley,
Try this (untested):
s - array(0, dim = c(2, 2, 4))
for(i in 1:4)
s[, ,i] - read_matrix(a, 2, 2)
Another (untested) option wold be
s0 - lapply(1:4, function(i) read_matrix(a, 2, 2))
s0
HTH,
Jorge
On Mon, Sep 27, 2010 at 6:12 AM, wesley mathew wrote:
Dear All
I want to
On 27/09/2010 2:45 AM, teetee wrote:
Hi, Duncan Murdoch...
i m facing same pro here..
n i m a very new user for R...
i m just start using it now for my final year project...
i wan to know how to run outside R???
i have no idea about it...
can u help me???
appreciate for your helping...
You
Hi,
I have a function that generates a set of data but I am having problems
determining the parameters using the nls fitting procedure.
MH-function(field,diameter,mu=10e-7,sig=0.1,Ms=100,chi=0){
#variables mu, sig, chi, Ms
#input: field and diameter
#all in CGS
rho - 5
kb - 1.38e-16
t -
Thanks David, works fine!
robert
--
View this message in context:
http://r.789695.n4.nabble.com/legend-tp2550747p2715250.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Suppose I have the following data frame (df):
YearPrice
---
200110
200220
200330
I would like to produce another data frame like this:
a.Yeara.Priceb.Yearb.Price
200220200110
200330
Hi
r-help-boun...@r-project.org napsal dne 27.09.2010 13:13:28:
Hi,
I have a function that generates a set of data but I am having problems
determining the parameters using the nls fitting procedure.
MH-function(field,diameter,mu=10e-7,sig=0.1,Ms=100,chi=0){
#variables mu,
Oops I forgot to add another line to the code (see below)!! You could add
some noise if you want to. Generating the data from the function was merely
a way to test if the fitting procedure works - I have experimental data that
should allow me to calculate the parameters mu, sig, chi and Ms
Hi:
One option is to read your data frame into R and then use your SQL code in
conjunction with the sqldf package. It uses SQLite as its engine.
HTH,
Dennis
On Mon, Sep 27, 2010 at 4:29 AM, Xin Zhang xin.zh...@gmail.com wrote:
Suppose I have the following data frame (df):
YearPrice
Hi Ulrich,
I'm studying the principles of Affinity Propagation and I'm really glad to
use your package (apcluster) in order to cluster my data. I have just an
issue to solve..
If I apply the funcion: apcluster(sim)
where sim is the matrix of dissimilarities, sometimes I encounter the
warning
Thanks Dennis. I will explore that.
On Mon, Sep 27, 2010 at 7:45 AM, Dennis Murphy djmu...@gmail.com wrote:
Hi:
One option is to read your data frame into R and then use your SQL code in
conjunction with the sqldf package. It uses SQLite as its engine.
HTH,
Dennis
On Mon, Sep 27, 2010
r-help-boun...@r-project.org napsal dne 27.09.2010 13:36:51:
Oops I forgot to add another line to the code (see below)!! You could
add
I do not have the previous code, I do not keep mails.
some noise if you want to. Generating the data from the function was
merely
You want to add some
Luis Felipe Parra felipe.parra at quantil.com.co writes:
Hello, I am trying to unlist a list, which is attached, and I am having the
problem that when I unlist it the number of elements changes from 5065 to
5084
x - lapply(SumaPluvi, FUN=[, 1);
n - sapply(x, FUN=length);
My result using Kaplan-Meier estimate in survival package was
inconsistent with that from Minitab. The survival probabilities are
same, but their 95% are different.
Confidence intervals for a survival curve may be calcualted on the
linear (poor performance), log (good), log-log (good), or
Dear R users,
How could I managed graphics in GIF format? What I have been doing is
graphics in *.ps or *.eps and after I convert them using CONVERT (from
ImageMagick) but the output quality is not good. Since these graphics will
be use for other users they must have a better image quality.
I
Dear R users,
How could I managed graphics in GIF format? What I have been doing is
graphics in *.ps or *.eps and after I convert them using CONVERT (from
ImageMagick) but the output quality is not good. Since these graphics will
be use for other users they must have a better image quality.
I
Updated!
MH-function(field,diameter,mu=10e-7,sig=0.1,Ms=100,chi=0){
#variables mu, sig, chi, Ms
#input: field and diameter
#all in CGS
rho - 5
kb - 1.38e-16
t - 300
length.d-length(diameter)
length.H-length(field)
M-double(length.H)
for (i in 1:length.H){
S1-0
try sqldf:
require(sqldf)
x - read.table(textConnection(YearPrice
+ 200110
+ 200220
+ 200330), as.is=TRUE, header=TRUE)
sqldf(select a.*, b.*
+ from x as a, x as b
+ where a.Year b.Year, method='raw')
Year Price Year Price
1 200220 200110
2 200330 2001
Hello,
Is it possible to instruct (permanently) R to write on csv (and read
from csv) time series, where the time stamp has a particular format:
say:
-mm-dd
i.e.,
as in
format(Sys.Date(), %Y-%m-%d)
Many thanks in advance,
Costas
__
# Dear R Community,
# I have this data frame:
df1 - data.frame(
F1 = factor( c( rep(D1,12),rep(D2,12),rep(D3,12) ) ),
F2 = factor( rep( rep( paste(O,1:6,sep=), rep(2,6) ), 3) ),
F3 = factor( rep( c(V1,V2), 18 ) ),
S1 =
On Mon, Sep 27, 2010 at 1:39 PM, Nilza BARROS nilzabar...@gmail.com wrote:
Dear R users,
How could I managed graphics in GIF format? What I have been doing is
graphics in *.ps or *.eps and after I convert them using CONVERT (from
ImageMagick) but the output quality is not good. Since these
On Mon, Sep 27, 2010 at 10:01 AM, Struve, Juliane
j.str...@imperial.ac.uk wrote:
Hi,
I am sorry that my question wasn not very clearly formulated. My real data
comes in 47 .csv files, one for each of 47 individual, for example:
,Fish_ID,Date,R2sqrt
1,1646,2006-08-18 08:48:59,0
I am guessing you are saving the plot using the menu system.
If that is the case, have a look at:
?pdf
?png
Generally, I like saving my graphics to pdf since it is vectorized.
Cheers,
Tal
Contact
Details:---
Contact me:
Hi,
I am sorry that my question wasn not very clearly formulated. My real data
comes in 47 .csv files, one for each of 47 individual, for example:
,Fish_ID,Date,R2sqrt
1,1646,2006-08-18 08:48:59,0
2,1646,2006-08-18 09:53:20,100
I would like to read the data for all individuals in the for loop
Dear r-help,
I create a graph of my baysian network. I use the package igraph. The names
of vertex are within the circle, I would leave them outside the circle?
E(g)$color - black
tkplot(g, ,vertex.label=names,layout=layout.kamada.kawai,
edge.color=E(g)$color)
Best Regards
Hi R-users
I can not change the name of one column only of my matrix.
my_matrix - matrix (1:12,ncol=3)
colnames(my_matrix)[1] - 'myname'
Error in dimnames(x) - dn :
length of 'dimnames' [2] not equal to array extent
thank you for your help
Lorenzo
Hi, I'm trying to make some changes in a vector according to some conditions.
It takes too long time however with vector length 10 and I guess a better
way would be using the apply function. I cannot sort out how, however.
As a for/if loop:
for (i in 1:length(PrH)) {
if (is.finite(PrH[i])
Hi
Is there a maximum length for the character string representing a level
of a factor? I have a set of several million variables, each a factor
of length 19. Each factor level is a character string which in some
cases can be many thousands of characters long. I am trying to find out
why
thank you very much for this sql package, the thing is that thoses table I
read are loaded into memory once and for all, and then we work with the
data.frames...
Do you think then that this is going to be quicker (as I would have thougth
that building the SQL DB from the flat file would already
The functional form is given in chapter 4 of my book:
Wood S.N. (2006) Generalized Additive Models: An Introduction with R.
Chapman and Hall/CRC Press. (reserve your copy now for christmas)
... but note that by default mgcv reparameterises so that the
identifiability constraints on the
Hi everybody,
using bwplot for producing panel boxplot with 3 dimensions
i want to add a mark on each boxplot representing one individual (on all its
dimensions)
till now, i didn't succeed getting the desired solution
I want as well to keep the median symbols as a line
Many thanks for your help
Thank you all for those great links, I will look at those.
Thanks again
Colin
--
View this message in context:
http://r.789695.n4.nabble.com/Good-documentation-about-Sweave-tp2714326p2715280.html
Sent from the R help mailing list archive at Nabble.com.
Is there an alternative to par(mfrow=c(2,1)) to get stacked scatterplot
matrixes generated with pairs?
I am using version 2.11.1 on Windows XP. The logic I am using follows, and
the second pairs plot replaces the first plot in the current graphics
device, which is not what I expected (or
Hi Lorenzo,
The problem is that my_matrix does not have dimnames. See below.
my_matrix - matrix (1:12,ncol=3)
str(my_matrix) ## does not have dimnames
dimnames(my_matrix) ## dimnames is NULL
colnames(my_matrix) - myname # fails because you are trying to
alter the value of something that does not
Hi,
It is because the column names do not exist. If you cast the matrix as a
data frame your code would work.
jon
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Lorenzo Cattarino
Sent: 27. september 2010 10:27
To:
Hi,
I'm not sure it's even possible (and if it is I don't know how, but I'm
no expert).
But I think it doesn't make much sense to have only one named column.
Just give it a vector:
vect_names - c(myname1, myname2, myname3)
colnames(my_matrix) - vect_names
HTH,
Ivan
Le 9/27/2010 10:26,
On Mon, Sep 27, 2010 at 7:49 AM, statquant2 statqu...@gmail.com wrote:
thank you very much for this sql package, the thing is that thoses table I
read are loaded into memory once and for all, and then we work with the
data.frames...
Do you think then that this is going to be quicker (as I
Hi,
set the 'vertex.label.dist' parameter:
g - graph.ring(10)
tkplot(g, vertex.label.dist=1, layout=layout.circle)
See ?igraph.plotting for details.
Best,
Gabor
On Mon, Sep 27, 2010 at 11:18 AM, anderson nuel anderson@gmail.com wrote:
Dear r-help,
I create a graph of my baysian
Is there an easy way to control smoothness of the contour lines?
In the plot I am working on due to the undersampling the contour
lines I am getting are jugged, but it is clear by eye these should
be basically straight lines.
In maps package I found smooth.map function, but maybe there is a more
Hi all,
I tried to install the rimage in order to get to the function
?read.jpeg. However, I get this error, independent what mirror I
choose:
install.packages(rimage)
--- Please select a CRAN mirror for use in this session ---
Warning message:
In getDependencies(pkgs, dependencies, available,
Hi,
I want to perform a hierarchical clustering using the median as linkage
metric. As I understand it the function hcluster in package amap have this
option but it does not produce the results that I expect.
In the example below M is a matrix of similarities that is transformed into
a matrix
On 27/09/2010 11:11 AM, Czerminski, Ryszard wrote:
Is there an easy way to control smoothness of the contour lines?
In the plot I am working on due to the undersampling the contour
lines I am getting are jugged, but it is clear by eye these should
be basically straight lines.
Straight lines
On Mon, Sep 27, 2010 at 8:22 AM, Kennedy henrik.aldb...@gmail.com wrote:
Hi,
I want to perform a hierarchical clustering using the median as linkage
metric. As I understand it the function hcluster in package amap have this
option but it does not produce the results that I expect.
In the
On Sun, 2010-09-26 at 09:41 -0700, Vik Rubenfeld wrote:
I'm experienced in statistics, but I am a first-time R user. I would like to
use R for correspondence analysis. I have installed R (Mac OSX). I have used
the package installer to install the CA package. I have run the following
line
On Mon, Sep 27, 2010 at 8:22 AM, Kennedy henrik.aldb...@gmail.com wrote:
Hi,
I want to perform a hierarchical clustering using the median as linkage
metric. As I understand it the function hcluster in package amap have this
option but it does not produce the results that I expect.
Also, if
Howdy,
I have created a set of plots, but I wish to increase the dpi to 300
(instead of the default 72). From the documentation, I thought that
the res parameter to png should accomplish this, but it appears to
greatly alter the appearance of my plot. (plot area becomes smaller,
plot lines
Howdy,
I have created a set of plots, but I wish to increase the dpi to 300
(instead of the default 72). From the documentation, I thought that
the res parameter to png should accomplish this, but it appears to
greatly alter the appearance of my plot. (plot area becomes smaller,
plot lines
Dear list!
gregexpr(a+(b+), abcdaabbc)
[[1]]
[1] 1 5
attr(,match.length)
[1] 2 4
What I want is the offsets of the matches for the group (b+), i.e. 2
and 7, not the offsets of the complete matches. Is there a way in R
to get that?
I know about gsubgn and strapply, but they only give me the
Dear R-ers!
Asking for your help with building the stacked area chart for the
following simple data (several variables - with date on the X axis):
### Creating a data set
my.data-data.frame(date=c(20080301,20080402,20080503,20090301,20090402,20090503,20100301,20100402,20100503),
On Mon, Sep 27, 2010 at 8:48 AM, Justin Fincher finc...@cs.fsu.edu wrote:
Howdy,
I have created a set of plots, but I wish to increase the dpi to 300
(instead of the default 72). From the documentation, I thought that
the res parameter to png should accomplish this, but it appears to
You can use the scale function, just use the minimum instead of the mean and
the range instead of the standard deviation.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From:
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Jonas Sundberg
Sent: Monday, September 27, 2010 1:43 AM
To: r-help@r-project.org
Subject: [R] make changes in existing vector with the apply function?
Hi, I'm trying to make
On 2010-09-27 4:54, Christophe Bouffioux wrote:
bwplot(v2 ~ v1 | z, data = ex3, layout=c(3,2),
pch = |,
par.settings = list(
plot.symbol = list(alpha = 1, col = transparent,cex = 1,pch = 20)),
panel = function(x, y){
panel.bwplot(x, y)
X-
The rimage package appears to have been abandoned. One option is the EBImage
package from Bioconductor.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: r-help-boun...@r-project.org
Why do you want 2 pairs plots on the same device? There may be a better
approach to what you want to do.
You could use splom from the lattice package along with the print.trellis
function to put 2 on the same page.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain
I have a two-column table as follows where age is in the 1st column and
the number of individuals is in the 2nd.
age;no
1;21
2;31
3;9
4;12
5;6
Can I use mean() and sd() to calculate the mean and standard deviation
from this or do I have to manually multiplicate 21*1+31*2 etc. / N?
On Mon, Sep 27, 2010 at 9:34 AM, Jonas Josefsson
jo...@runtimerecords.net wrote:
I have a two-column table as follows where age is in the 1st column and the
number of individuals is in the 2nd.
age;no
1;21
2;31
3;9
4;12
5;6
You can use the following trick:
x = rep(age, no)
This repeats
try this:
x - gregexpr(a+(b+), abcdaabbcaaacaaab)
justA - gregexpr(a+, abcdaabbcaaacaaab)
# find matches in 'x' for 'justA'
indx - which(justA[[1]] %in% x[[1]])
# now determine where 'b' starts
justA[[1]][indx] + attr(justA[[1]], 'match.length')[indx]
[1] 2 7 17
On Mon, Sep 27, 2010
Thank you Jim, but just as the solution that I discussed, your
proposal involves deconstructing the pattern and searching several
times. I'm looking for a general and efficient solution. Internally,
the regexpr engine has all necessary information after one pass
through the string. What I need
On Mon, Sep 27, 2010 at 7:16 PM, Henrique Dallazuanna www...@gmail.com wrote:
You've tried:
gregexpr(b+, abcdaabbc)
But this would match the third occurrence of b+ in abcdaabbcbb. But
in this example I'm only interested in b+ if it's preceded by a+.
Titus
On Mon, Sep 27, 2010 at 11:48 AM, Titus von der Malsburg
malsb...@gmail.com wrote:
Dear list!
gregexpr(a+(b+), abcdaabbc)
[[1]]
[1] 1 5
attr(,match.length)
[1] 2 4
What I want is the offsets of the matches for the group (b+), i.e. 2
and 7, not the offsets of the complete matches. Is
On Mon, Sep 27, 2010 at 7:29 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
Try this zero width negative look behind expression:
gregexpr((?!a+)(b+), abcdaabbc, perl = TRUE)
[[1]]
[1] 2 7
attr(,match.length)
[1] 1 2
Thanks Gabor, but this gives me the same result as
gregexpr(b+,
You could do this:
gregexpr(ab+, abcdaabbcbb)[[1]] + 1
On Mon, Sep 27, 2010 at 2:25 PM, Titus von der Malsburg
malsb...@gmail.comwrote:
On Mon, Sep 27, 2010 at 7:16 PM, Henrique Dallazuanna www...@gmail.com
wrote:
You've tried:
gregexpr(b+, abcdaabbc)
But this would match the third
Fractional polynomials (FPs) are an automatic way of fitting
non-linear, parametric effects. The R-package mfp implements a
frequentist inference approach for FP models. Recently, we have proposed
a Bayesian inference approach for normal FP models, which is based on
the quasi-default
Hi All,
I would like to announce the release of Deducer 0.4-1 and JGR 1.7-2 to CRAN.
The updates should be propagating through the mirrors over the next few days.
On the Deducer side we have a number of nice improvements:
1. A new Text Field Widget for plug-ins is included, which is better
I have 500,00 rows in my matrix and i was wondering whether there is any way to
get its SVD without breaking it to parts
because if R can only read about 1000 columns then to have a rectangular matrix
(diagonal i think they are called) I will need to have only 1000 rows
I want to know how i
You've tried:
gregexpr(b+, abcdaabbc)
On Mon, Sep 27, 2010 at 12:48 PM, Titus von der Malsburg malsb...@gmail.com
wrote:
Dear list!
gregexpr(a+(b+), abcdaabbc)
[[1]]
[1] 1 5
attr(,match.length)
[1] 2 4
What I want is the offsets of the matches for the group (b+), i.e. 2
and 7, not
*Hello,
I'm new to R and trying to do Split Split Plot Design analysis with aov
function in R. Sharing any worked example and suggestion will be highly
appreciated. Thanks
Regards!
*
--
*
Muhammad Yaseen
*
[[alternative HTML version deleted]]
http://www.amazon.com/Statistical-Design-George-Casella/dp/1441926143/ref=sr_1_1?s=gatewayie=UTF8qid=1285609902sr=8-1
Hello Mohd. Yaseen,
Please check out the book by Dr. Casella and his website
www.stat.ufl.edu/~casella for the relevant R codes. Chapter 5 of this book
talks about Split Split
Hi everyone:
I have a kinda easy question but i do not know how to solve that in a simple
way.
I want to compare the rows of two matrices.
col1 - c(1,2,3,4,5,6)
col2 - c(6,5,4,3,2,1)
m - cbind(col1, col2)
col3 - c(1,3,2,6)
col4 - c(6,3,5,1)
n - cbind(col3,
I found a solution to my original question (see code below).
But I have a question about cosmetics, which I always find very challenging.
1. How can I make all dates appear on the X axis (rotated at 90
degrees vs. horizontal)?
2. How can I create vertical grid lines so that at each date there is
a
one way is the following:
col1 - c(1,2,3,4,5,6)
col2 - c(6,5,4,3,2,1)
m - cbind(col1, col2)
col3 - c(1,3,2,6)
col4 - c(6,3,5,1)
n - cbind(col3, col4)
ind.n - do.call(paste, c(as.data.frame(n), sep = \r))
ind.m - do.call(paste, c(as.data.frame(m), sep = \r))
ind.n %in% ind.m
I hope it helps.
On Mon, Sep 27, 2010 at 1:34 PM, Titus von der Malsburg
malsb...@gmail.com wrote:
On Mon, Sep 27, 2010 at 7:29 PM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
Try this zero width negative look behind expression:
gregexpr((?!a+)(b+), abcdaabbc, perl = TRUE)
[[1]]
[1] 2 7
On Mon, Sep 27, 2010 at 5:27 AM, Ben Bolker bbol...@gmail.com wrote:
Luis Felipe Parra felipe.parra at quantil.com.co writes:
Hello, I am trying to unlist a list, which is attached, and I am having the
problem that when I unlist it the number of elements changes from 5065 to
5084
x -
I am learning R via a textbook that performs analysis with SPSS and SAS. In
trying to reproduce the results for an ordinal logit model, I get very
similar point estimates for my cut-off points, but the parameters for the
covariate q60 do not match. The estimate for q51 also matches. Is this
Hi Peter,
Thank you for your thoughtful reply. I am tweaking the setting print
settings you suggested. It looks like this is going to solve my problem.
Thanks very much for help.
Jonathan
On Sat, Sep 25, 2010 at 6:00 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
On 2010-09-25 8:59, Jonathan
Hi I am using xyplot() to plot on the log scale by using scale=list(log=T)
argument. For example:
xyplot(1:10~1:10, scales=list(log=T))
But the axis labels are printed as scientific notation (10^0.0, etc), instead
of
fixed notation. How can I change that to fixed notation?
options(scipen=4)
Hello Everyone,
I'm trying to conduct a couple of power analyses and was hoping someone might
be able to help. I want to estimate the sample size that would be necessary to
adequately power a couple of non-inferiority tests. The first would be a
log-rank test and the second would be a
Try this:
xyplot(1:10~1:10, scales=list(log = T, labels = round(log(1:10), 4)))
On Mon, Sep 27, 2010 at 4:10 PM, array chip arrayprof...@yahoo.com wrote:
Hi I am using xyplot() to plot on the log scale by using scale=list(log=T)
argument. For example:
xyplot(1:10~1:10, scales=list(log=T))
What I'm trying to do is to figure out how to create lattice charts of
%right by region, or alternatively, by date from a dataset of observations
that looks something like this:
date,location,region,correct
2010-09-10,a,r1,yes
2010-09-10,a,r1,yes
2010-09-10,a,r1,no
2010-09-11,a,r1,yes
Mark -
Here's one way to get the percentages you want. Suppose your
data frame is called df:
correct = subset(as.data.frame(with(df,table(date,region,correct))),
correct=='yes')
all = as.data.frame(with(df,table(date,region)))
names(all)[3] = 'Total'
both =
Thanks for the suggestion. But my example is just an example, I would prefer to
have some generalized solution, like what options(scipen=4) does in general
graphics, which usually gave pretty axis labels as well.
Any suggestions?
Thanks
John
From: Henrique
I haven't done much with the type of data you're working with, but
here is a post that lists a few packages for doing sample size
calculations in R. Perhaps one of them will be helpful.
https://stat.ethz.ch/pipermail/r-help/2008-February/154223.html
Andrew Miles
On Sep 27, 2010, at 2:09
Hi folks,
I use lm to run regression and I don't know how to predict dependent
variable based on the model.
I used predict.lm(model, newdata=80), but it gave me warnings.
Also, how can I get the variance of dependent variable based on model.
Thanks.
[[alternative HTML version deleted]]
This is quite elegant (thanks) and brings up a problem I could not
solve awhile back, although Dr. Sarkar did his best to help.
How do I do the same thing in a panel plot?
e.g., toy example
temp.df - data.frame(X=seq(1,100,by=1),Y=seq(1,50.5,by=.5),class=rep
(c(A,B),each=50))
xyplot(Y ~ X |
Hello All,
I noticed when I generated some boxplots, the data is presented in
alphabetical order along the x-axis (the data in this case was the four
quandrants of a sample area (NE,NW, SE, SW) that was my first column of
data). Is there a way to have R plot the data in a different order? I
Hi
carolina plescia wrote:
Dear all,
in GADM map there are three levels (nation, province and precinct) for each
country of the world but for all of them you are never able to plot only one
part of a chosen country.
The Spatial object you get when you read in the shapefile has
convenient
Hi,
Try this:
# using the iris dataset
mydat - iris
mymodel - lm(Sepal.Length ~ Petal.Length + Species, data = mydat)
summary(mymodel)
newdat - data.frame(Petal.Length = seq(1, 10, by = .1),
Species = factor(rep(virginica, 91)))
results - predict(object = mymodel, newdata =
Hi Eddie,
I've been on a role with the iris data, so I figure why stop.
Assuming that one variable is a factor, you can easily reverse it, and
if you want fine tuned control, then just reorder the levels. Here is
an example:
dat - iris
boxplot(Sepal.Length ~ Species, data = dat)
Tena koe Eddie
One way:
eddie - data.frame(grp=rep(c('small','medium','large','very large'), each=20),
wgt=rnorm(80, 100, 10))
with(eddie, plot(grp, wgt))
eddie$grp - factor(eddie$grp, levels=c('small','medium','large','very large'))
with(eddie, plot(grp, wgt))
HTH ...
Peter Alspach
Hello-
After looking through ?spplot, I would expect that I could specify the
values of the cuts:
...‘cuts’ number of cuts or the actual cuts to use...
So in the following command,
spplot(lzm.krige.dir[var1.pred], scales=list(draw=TRUE),
xlab=Easting,ylab=Northing,
1 - 100 of 134 matches
Mail list logo