Re: [R] Plotting confidence intervals of two response on same graph (panel).

2010-06-17 Thread Kim Jung Hwa
I actually need to plot all of my confidence interval for x and y axis but
it seems error.crosses only plot the common ones. But thanks for suggesting
error.crosses. Please let me know if I can specify some option in
eror.crosses to implement that.

Any idea about how to plot all confidence intervals even if they are not
intersecting as in the following picture.
http://www.optics.rochester.edu/workgroups/cml/opt307/spr04/pavel/plot_small.jpg

Thanks!



On Thu, Jun 17, 2010 at 9:49 AM, William Revelle  wrote:

> Kim,
>  It is possible that error.crosses in the psych package will do what you
> want.
>
> Bill
>
>
> At 9:25 AM -0400 6/17/10, Kim Jung Hwa wrote:
>
>>  Hello!
>>
>> I would like to draw a graph like the following:
>>
>> http://www.optics.rochester.edu/workgroups/cml/opt307/spr04/pavel/plot_small.jpg
>>
>> Aim is to plot confidence intervals of treatments for X(=response1) and
>> Y(=response2) axis simultaneously to visualize aggreement of confidence
>> interval for two responses.
>>
>> Can anyone please provide me some direction to start with?
>>
>> Thanks!
>> --
>> Kim.
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
> --
> William Revelle http://personality-project.org/revelle.html
> Professor   http://personality-project.org
> Department of Psychology
> http://www.wcas.northwestern.edu/psych/
> Northwestern University http://www.northwestern.edu/
> Use R for psychology
> http://personality-project.org/r
> It is 6 minutes to midnight http://www.thebulletin.org
>



-- 
Kim.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Plotting confidence intervals of two response on same graph (panel).

2010-06-17 Thread Kim Jung Hwa
Hello!

I would like to draw a graph like the following:
http://www.optics.rochester.edu/workgroups/cml/opt307/spr04/pavel/plot_small.jpg

Aim is to plot confidence intervals of treatments for X(=response1) and
Y(=response2) axis simultaneously to visualize aggreement of confidence
interval for two responses.

Can anyone please provide me some direction to start with?

Thanks!
-- 
Kim.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Order labels in qplot() - ggplot2 {help}

2010-06-10 Thread Kim Jung Hwa
Hello,

I want to arrage the label according to my preference eg.. (va, vp, a, b,
c) but don't know how to supress default ordering. Any
suggestions?

Please try the code below:

n <- c("va", "vp", "a", "b", "c")
p <- c(2, 2,1, 3,5)
pm<- c(3,4,2,5,4)
pn <- c(1,1,1,2,3)
x<-data.frame(cbind(n,p,pm,pn))
library(ggplot2)
qplot(x=n, y=p, data=x, ymin=pn, ymax=pm,
  xlab='', ylab='', main='Order Label as: va vp a b c') +
  geom_hline(yintercept = 2) +
  geom_linerange() +
  coord_flip()

Thanks!

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] persp(); help with 'tck' option

2010-05-26 Thread Kim Jung Hwa
Hi All,

I'm using 'tck' option to *reduce* the length of tick marks but it is not
working, can anyone please tell me where I'm going wrong...

require(graphics)
require(grDevices)
x <- seq(-10, 10, length= 30)
y <- x
f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
z[is.na(z)] <- 1

# 'bg' works but 'tck' is not showing any effect...
par(bg="gray90", tck=0.01)
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue",
ltheta = 120, shade = 0.75, ticktype = "detailed",
xlab = "X", ylab = "Y", zlab = "Sinc( r )"
) -> res

Any help would be highly appreciated!
Thanks,

-- 
Kim.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] forest() in {metafor} :: edit labels

2010-05-26 Thread Kim Jung Hwa
try 'slab=' option...

HTH,
Kim

On Wed, May 26, 2010 at 7:29 PM, Xin Ge  wrote:

> Hi Kim and Others,
>
> Can anyone please help me on how can I edit default labels ( "Study 1",
> "Study 2",...)
>
> using forest() - same question as below. Which option I should try?
>
> It would be a great help. Thanks in advance,
>
> On Sun, Dec 13, 2009 at 7:14 PM, Kim Jung Hwa wrote:
>
>> Hi All,
>>
>> I'm using forest() from metafor package to plot forest plots. Here is the
>> code
>>
>> e<-1:6
>> v<-seq(2,3,.20)
>> forest(e,v)
>>
>> I want to edit default labels "Study 1", "Study 2" and so on... how can I
>> do
>> it?
>>
>> I tried ?forest(), but couldn't find any details. Any suggestions? Thanks,
>> Kim
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Xin Ge.
>



-- 
Kim.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] lattice 'scales' option help

2010-05-24 Thread Kim Jung Hwa
Thanks Dennis and Peter, it worked.

On Mon, May 24, 2010 at 12:44 PM, Peter Ehlers  wrote:

> On 2010-05-24 9:38, Kim Jung Hwa wrote:
>
>> Hi All,
>>
>> I'm trying to draw boxplots. I'm having a hard time to get "ticks labels"
>> on
>> multiple panels using 'alternating' option.
>>
>> # R Code:
>> # May not be the best example, please just look into 'scales' option
>> library(lattice)
>> data(OrchardSprays)
>> dta<- subset(OrchardSprays, OrchardSprays$rowpos %in% c(1,2,3))
>>
>> # Original
>> # This works fine, as you can see Y-AXIS labels (0,50,100) on both Panel-1
>> and Panel-3, and
>> # X-AXIS lables (A,B,C,...) on both Panel-1 and Panel-2
>> bwplot(decrease ~ treatment | factor(rowpos), data=dta,
>>   pch="|",
>>   scales=list(y=list(alternating=1)) # default
>> )
>>
>> # Flipping "decrease ~ treatment" TO "treatment ~ decrease"
>> # Here somehow 'alternating' option does not work, I'm only getting labels
>> (0, 50, 100) on Panel-1 and NOT on Panel-2 as desired
>> # I need labels (0,50,100) on first two panels and not 3rd one.
>> # Can anyone tell me where I'm going wrong? OR someway to achieve this?
>>
>> bwplot(treatment ~ decrease | factor(rowpos), data=dta,
>>   pch="|",
>>   scales=list(y=list(alternating=1))
>> )
>>
>
> You've switched x and y; try x=list(alternating).
>
>  -Peter Ehlers
>
>
>
>> Any help would be highly appreciated, thank you in advance...
>>
>> Regards,
>> Kim
>>
>>


-- 
Kim.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] lattice 'scales' option help

2010-05-24 Thread Kim Jung Hwa
Hi All,

I'm trying to draw boxplots. I'm having a hard time to get "ticks labels" on
multiple panels using 'alternating' option.

# R Code:
# May not be the best example, please just look into 'scales' option
library(lattice)
data(OrchardSprays)
dta <- subset(OrchardSprays, OrchardSprays$rowpos %in% c(1,2,3))

# Original
# This works fine, as you can see Y-AXIS labels (0,50,100) on both Panel-1
and Panel-3, and
# X-AXIS lables (A,B,C,...) on both Panel-1 and Panel-2
bwplot(decrease ~ treatment | factor(rowpos), data=dta,
  pch="|",
  scales=list(y=list(alternating=1)) # default
)

# Flipping "decrease ~ treatment" TO "treatment ~ decrease"
# Here somehow 'alternating' option does not work, I'm only getting labels
(0, 50, 100) on Panel-1 and NOT on Panel-2 as desired
# I need labels (0,50,100) on first two panels and not 3rd one.
# Can anyone tell me where I'm going wrong? OR someway to achieve this?

bwplot(treatment ~ decrease | factor(rowpos), data=dta,
  pch="|",
  scales=list(y=list(alternating=1))
)

Any help would be highly appreciated, thank you in advance...

Regards,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] step function

2010-05-10 Thread Kim Jung Hwa
Hi All

I need some help with plotting a step function, currently I'm using

sfun <- stepfun(c(1, 2, 5,10, 20), c(0, 11, 22, 33, 44, 0), f=0)
plot(sfun, pch=NA, main="", xlim=c(1,20))

which I working fine, but my data is in the following format:

Min Max Value
1 2 11
2 5 22
510 33
10 20 44

1. To save time, is there a way to directly plot the above data as it is
(without any reformatting).
2. Also, I need with starting the x-axis value from 1, xlim is not
completely helping me with this.

Any help would be highly appreciated. Thank you,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Visualizing binary response data?

2010-05-04 Thread Kim Jung Hwa
Hi All,

I'm dealing with binary response data for the first time, and I'm confused
about what kind of graphics I could explore in order to pick relevant
predictors and their relation with response variable.

I have 8-10 continuous predictors and 4-5 categorical predictors. Can anyone
suggest what kind of graphics I can explore to see how predictors behave
w.r.t. response variable...

Any help would be greatly appreciated, thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] reshaping data

2010-03-31 Thread Kim Jung Hwa
Actually, apart from melt() in reshape package.

On Wed, Mar 31, 2010 at 2:37 PM, Kim Jung Hwa wrote:

> Thanks Henrique and Stephan for your reply!
>
> Henrique, I'm planning to do some arthitmetic operations on tranformed
> (matrix) data and then would like to convert it back to original format (as
> a data frame)... is there an equivalent easy command for this too? Thanks,
>
>   On Wed, Mar 31, 2010 at 2:26 PM, Henrique Dallazuanna 
> wrote:
>
>> Try this:
>>
>>  xtabs(Val ~ Var1 + Var2, data = x)
>>
>> On Wed, Mar 31, 2010 at 3:23 PM, Kim Jung Hwa 
>> wrote:
>> > Hi All,
>> >
>> > Can someone help me reshape following data:
>> >
>> > Var1 Var2 Val
>> > A X 1
>> > A Y 2
>> > A Z 3
>> > B X 4
>> > B Y 5
>> > B Z 6
>> >
>> > to some kind of matrix/tabular format (preferably as a matrix), may be
>> like
>> >
>> > Var1 X Y Z
>> > A 1 2 3
>> > B 4 5 6
>> >
>> > Any help would be greatly appreciated,
>> > Kim
>> >
>> >[[alternative HTML version deleted]]
>> >
>> > __
>> > R-help@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> > and provide commented, minimal, self-contained, reproducible code.
>> >
>>
>>
>>
>> --
>> Henrique Dallazuanna
>> Curitiba-Paraná-Brasil
>> 25° 25' 40" S 49° 16' 22" O
>>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] reshaping data

2010-03-31 Thread Kim Jung Hwa
Thanks Henrique and Stephan for your reply!

Henrique, I'm planning to do some arthitmetic operations on tranformed
(matrix) data and then would like to convert it back to original format (as
a data frame)... is there an equivalent easy command for this too? Thanks,

On Wed, Mar 31, 2010 at 2:26 PM, Henrique Dallazuanna wrote:

> Try this:
>
>  xtabs(Val ~ Var1 + Var2, data = x)
>
> On Wed, Mar 31, 2010 at 3:23 PM, Kim Jung Hwa 
> wrote:
> > Hi All,
> >
> > Can someone help me reshape following data:
> >
> > Var1 Var2 Val
> > A X 1
> > A Y 2
> > A Z 3
> > B X 4
> > B Y 5
> > B Z 6
> >
> > to some kind of matrix/tabular format (preferably as a matrix), may be
> like
> >
> > Var1 X Y Z
> > A 1 2 3
> > B 4 5 6
> >
> > Any help would be greatly appreciated,
> > Kim
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] reshaping data

2010-03-31 Thread Kim Jung Hwa
Hi All,

Can someone help me reshape following data:

Var1 Var2 Val
A X 1
A Y 2
A Z 3
B X 4
B Y 5
B Z 6

to some kind of matrix/tabular format (preferably as a matrix), may be like

Var1 X Y Z
A 1 2 3
B 4 5 6

Any help would be greatly appreciated,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] One main title and One legend for multiple lattice plots

2010-03-19 Thread Kim Jung Hwa
Ohh I got your point Deepayan, thats a stupid question from me. I can
easilty rbind my four datasets, distuingusing them by a new variable, say
"type", and then instead of plotting a 2D image, I can use a conditioning
variable to plot a 3D image and achieve what I what.

I'm sorry about this, thanks a lot!
Kim

On Fri, Mar 19, 2010 at 6:24 AM, Deepayan Sarkar
wrote:

> On Fri, Mar 19, 2010 at 8:37 AM, Kim Jung Hwa 
> wrote:
> > Hi David,
> >
> > Thank you for your reply. I'm sorry if I've misconveyed my question: here
> it
> > goes again:
> >
> > *** I want a common "main title" and a common "legend" after I
> > output/print four different lattice plots on a single .wmf or .pdf
> file***
> > Somewhat as in this image:
> >
> >
> http://www.ncl.ucar.edu/Training/Workshops/Exercises/Images/panel_ex08.png
>
> But this is also not a good example (assuming that you really want
> what you claim you want) because it is precisely the type of plot
> multipanel Trellis graphics are designed for. For example, see the
> last example in example(levelplot). In the case of your toy example,
>
> p2[c(1, 1)]
>
> So you still need to convince us of the need for what you want.
> However, if you do really need it, you will need to use some
> lower-level grid functions (basically, create a viewport and put the
> two lattice plots inside, then add the main title and legend using
> grid directly).
>
> -Deepayan
>
> > # R code:
> > library(lattice)
> > p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> > type = "a", main="Remove this title and legend on right",
> > auto.key = list(space = "right", points = FALSE, lines = TRUE))
> > p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> > type = "a", main="Need a single / legend",
> > auto.key = list(space = "right", points = FALSE, lines = TRUE))
> >
> > win.metafile("Rplot%02d.wmf", width=12, height=8)
> > print(p1, split=c(1,1,2,2), more=TRUE)
> > print(p2, split=c(1,2,2,2), more=TRUE)
> > print(p1, split=c(2,1,2,2), more=TRUE)
> > print(p2, split=c(2,2,2,2))
> > dev.off()
> > Thanks,
> > Kim
> >
> >
> > On Thu, Mar 18, 2010 at 10:21 PM, David Winsemius <
> dwinsem...@comcast.net>wrote:
> >
> >>
> >> On Mar 18, 2010, at 10:10 PM, Kim Jung Hwa wrote:
> >>
> >> Hi All,
> >>>
> >>> Can anyone please help me with getting a "single title" and "legend"
> for
> >>> both the plots in the following R code. I'll eventually be using .wmf
> >>> file.
> >>>
> >>
> >> This is either incredibly simple or you have not explained what you
> reall
> >> want. Not being on windos I would not be making a win-metafile but this
> pdf
> >> appears to be doing what you ask:
> >>
> >>  ttl <- "Some random text"
> >>
> >> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> >>  type = "a", main=ttl,
> >>
> >>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
> >> p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> >>  type = "a", main=ttl,
> >>
> >>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
> >>
> >> pdf("Rplot%02d.pdf", width=12, height=8)
> >>
> >> print(p1, split=c(1,1,2,2), more=TRUE)
> >> print(p2, split=c(1,2,2,2), more=TRUE)
> >> print(p1, split=c(2,1,2,2), more=TRUE)
> >> print(p2, split=c(2,2,2,2))
> >> dev.off()
> >>
> >>
> >>> # R code:
> >>> library(lattice)
> >>> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> >>>  type = "a", main="Same title / legend",
> >>>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
> >>> p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
> >>>  type = "a", main="Same title / legend",
> >>>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
> >>>
> >>> win.metafile("Rplot%02d.wmf", width=12, height=8)
> >>> print(p1, split=c(1,1,2,2), more=TRUE)
> >>> print(p2, split=c(1,2,2,2), more=TRUE)
> >>> print(p1, split=c

Re: [R] One main title and One legend for multiple lattice plots

2010-03-18 Thread Kim Jung Hwa
Hi David,

Thank you for your reply. I'm sorry if I've misconveyed my question: here it
goes again:

*** I want a common "main title" and a common "legend" after I
output/print four different lattice plots on a single .wmf or .pdf file***
Somewhat as in this image:

http://www.ncl.ucar.edu/Training/Workshops/Exercises/Images/panel_ex08.png

# R code:
library(lattice)
p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
 type = "a", main="Remove this title and legend on right",
 auto.key = list(space = "right", points = FALSE, lines = TRUE))
p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
 type = "a", main="Need a single / legend",
 auto.key = list(space = "right", points = FALSE, lines = TRUE))

win.metafile("Rplot%02d.wmf", width=12, height=8)
print(p1, split=c(1,1,2,2), more=TRUE)
print(p2, split=c(1,2,2,2), more=TRUE)
print(p1, split=c(2,1,2,2), more=TRUE)
print(p2, split=c(2,2,2,2))
dev.off()
Thanks,
Kim


On Thu, Mar 18, 2010 at 10:21 PM, David Winsemius wrote:

>
> On Mar 18, 2010, at 10:10 PM, Kim Jung Hwa wrote:
>
> Hi All,
>>
>> Can anyone please help me with getting a "single title" and "legend" for
>> both the plots in the following R code. I'll eventually be using .wmf
>> file.
>>
>
> This is either incredibly simple or you have not explained what you reall
> want. Not being on windos I would not be making a win-metafile but this pdf
> appears to be doing what you ask:
>
>  ttl <- "Some random text"
>
> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>  type = "a", main=ttl,
>
>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
> p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>  type = "a", main=ttl,
>
>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
>
> pdf("Rplot%02d.pdf", width=12, height=8)
>
> print(p1, split=c(1,1,2,2), more=TRUE)
> print(p2, split=c(1,2,2,2), more=TRUE)
> print(p1, split=c(2,1,2,2), more=TRUE)
> print(p2, split=c(2,2,2,2))
> dev.off()
>
>
>> # R code:
>> library(lattice)
>> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>>  type = "a", main="Same title / legend",
>>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
>> p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>>  type = "a", main="Same title / legend",
>>  auto.key = list(space = "right", points = FALSE, lines = TRUE))
>>
>> win.metafile("Rplot%02d.wmf", width=12, height=8)
>> print(p1, split=c(1,1,2,2), more=TRUE)
>> print(p2, split=c(1,2,2,2), more=TRUE)
>> print(p1, split=c(2,1,2,2), more=TRUE)
>> print(p2, split=c(2,2,2,2))
>> dev.off()
>>
>> Thanks in advance,
>> Kim
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> David Winsemius, MD
> West Hartford, CT
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] One main title and One legend for multiple lattice plots

2010-03-18 Thread Kim Jung Hwa
Hi All,

Can anyone please help me with getting a "single title" and "legend" for
both the plots in the following R code. I'll eventually be using .wmf file.

# R code:
library(lattice)
p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
   type = "a", main="Same title / legend",
   auto.key = list(space = "right", points = FALSE, lines = TRUE))
p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
   type = "a", main="Same title / legend",
   auto.key = list(space = "right", points = FALSE, lines = TRUE))

win.metafile("Rplot%02d.wmf", width=12, height=8)
print(p1, split=c(1,1,2,2), more=TRUE)
print(p2, split=c(1,2,2,2), more=TRUE)
print(p1, split=c(2,1,2,2), more=TRUE)
print(p2, split=c(2,2,2,2))
dev.off()

Thanks in advance,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
Nothing wrong with that, its working fine... thanks a lot!

Kim

On Thu, Mar 18, 2010 at 2:16 PM, jim holtman  wrote:

> It depends on what you want them for.  With win.metafile, what is the
> problem with multiple files?  You can still include them in
> powerpoint/word.  If you want it in one file, then use PDF and you can
> cut/paste the graph from the pages that you want.  I typically create a PDF
> file if I have a number of graphs and then use the 'snapshot' under Adobe
> Reader to capture the output for my document.  It usually has enough
> resolution.
>
>
> On Thu, Mar 18, 2010 at 1:41 PM, Kim Jung Hwa wrote:
>
>> Hi Jim, thank you for your reply.
>>
>> Apart from win.metafile(), is there some other function available which
>> can handle multiple prints or par(mfrow=c(2,2)) command and eventually can
>> be used in powerpoint/word. thanks,
>>
>> Kim
>>
>>   On Thu, Mar 18, 2010 at 12:42 PM, jim holtman wrote:
>>
>>> ?win.metafile
>>>
>>>
>>> For win.metafile only one plot is allowed per file, and Windows seems to
>>> disallow reusing the file. So the *only* way to allow multiple plots is
>>> to use a parametrized filename as in the example.
>>> win.metafile("Rplot%02d.wmf", pointsize = 10)
>>> Notice the %02d in the file name.
>>>
>>>   On Thu, Mar 18, 2010 at 12:36 PM, Kim Jung Hwa <
>>> kimhwamaill...@gmail.com> wrote:
>>>
>>>>  Hi All,
>>>>
>>>> I need a file which I can import to MS Word, I'm trying win.metafile(),
>>>> but
>>>> it does not seem to support multiple print commands at once (please see
>>>> below). Is there an alternative to get plots file which can be used in
>>>> powerpoint/word?
>>>>
>>>> # R code:
>>>> # this does not work; but same thing works with pdf()
>>>> library(lattice)
>>>> win.metafile("test.wmf")
>>>> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>>>>   type = "a",
>>>>   auto.key =
>>>>   list(space = "right", points = FALSE, lines = TRUE))
>>>>
>>>> p2 <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l",
>>>>   scales = list(x = list(alternating = 2)),
>>>>   main = "Yearly Sunspots")
>>>>
>>>> print(p1, split=c(1,1,2,1), more=TRUE)
>>>> print(p2, split=c(2,1,2,1))
>>>> dev.off()
>>>>
>>>> Can anyone help please, thanks,
>>>> Kim
>>>>
>>>>[[alternative HTML version deleted]]
>>>>
>>>> __
>>>> R-help@r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>
>>>
>>>
>>> --
>>> Jim Holtman
>>> Cincinnati, OH
>>> +1 513 646 9390
>>>
>>> What is the problem that you are trying to solve?
>>>
>>
>>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem that you are trying to solve?
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
Hi Jim, thank you for your reply.

Apart from win.metafile(), is there some other function available which can
handle multiple prints or par(mfrow=c(2,2)) command and eventually can be
used in powerpoint/word. thanks,

Kim

On Thu, Mar 18, 2010 at 12:42 PM, jim holtman  wrote:

> ?win.metafile
>
>
> For win.metafile only one plot is allowed per file, and Windows seems to
> disallow reusing the file. So the *only* way to allow multiple plots is to
> use a parametrized filename as in the example.
> win.metafile("Rplot%02d.wmf", pointsize = 10)
> Notice the %02d in the file name.
>
>   On Thu, Mar 18, 2010 at 12:36 PM, Kim Jung Hwa  > wrote:
>
>>  Hi All,
>>
>> I need a file which I can import to MS Word, I'm trying win.metafile(),
>> but
>> it does not seem to support multiple print commands at once (please see
>> below). Is there an alternative to get plots file which can be used in
>> powerpoint/word?
>>
>> # R code:
>> # this does not work; but same thing works with pdf()
>> library(lattice)
>> win.metafile("test.wmf")
>> p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
>>   type = "a",
>>   auto.key =
>>   list(space = "right", points = FALSE, lines = TRUE))
>>
>> p2 <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l",
>>   scales = list(x = list(alternating = 2)),
>>   main = "Yearly Sunspots")
>>
>> print(p1, split=c(1,1,2,1), more=TRUE)
>> print(p2, split=c(2,1,2,1))
>> dev.off()
>>
>> Can anyone help please, thanks,
>> Kim
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem that you are trying to solve?
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] multiple print commands in win.metafile()

2010-03-18 Thread Kim Jung Hwa
Hi All,

I need a file which I can import to MS Word, I'm trying win.metafile(), but
it does not seem to support multiple print commands at once (please see
below). Is there an alternative to get plots file which can be used in
powerpoint/word?

# R code:
# this does not work; but same thing works with pdf()
library(lattice)
win.metafile("test.wmf")
p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
   type = "a",
   auto.key =
   list(space = "right", points = FALSE, lines = TRUE))

p2 <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l",
   scales = list(x = list(alternating = 2)),
   main = "Yearly Sunspots")

print(p1, split=c(1,1,2,1), more=TRUE)
print(p2, split=c(2,1,2,1))
dev.off()

Can anyone help please, thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R / R+ Webminar *** R-PLUS Rocks: Interactive, Comprehensible and Highly Visual. March 12th @ 12PM ET (USA Time)

2010-03-02 Thread Kim Jung Hwa
Is R-PLUS free as R is?
Thanks,
On Tue, Mar 2, 2010 at 4:28 PM, s...@xlsolutions-corp.com <
s...@xlsolutions-corp.com> wrote:

> Welcome to R/ R-PLUS Webminar Series. R-PLUS 3.3 Rocks: Interactive,
> Comprehensible and Highly Visual.
> http://www.xlsolutions-corp.com/webminar.asp.
>
> March 12th @ 12PM ET (USA Time)
>
> Increase your productivity with R-PLUS 3.3 by attending the webminar and
> learning how to:
>
> 1. Interactively clicking your way through your favorite statisticals
> models without the need of programming.
> 2. Use state-of-the-art R-PLUS tools to produce Publication Quality
> Graphics and Reports at a click
> 3. Edit your Graphics
> 4. Take advantage of the new R-PLUS 64-bit on windows for larger data
> sets
> 5. For SAS users, our new app R+SAS2R lets you see at a click exactly
> which R function (syntax included) is equivalent to a given SAS Proc!
>
> Come learn about R-PLUS 3.3 new cool features and suggest improvements.
>
> Space is limited. Reserve your webminar seat now at:
> http://www.xlsolutions-corp.com/webminar.asp.
> You can also email Ms Jennifer McDonald ( jen at  xlsolutions-corp.com)
> to register or request the free webminar video.
>
> Our March-April R training courses are available at:
> www.xlsolutions-corp.com/rcourses
>
>  Regards -
>
>  Sue Turner
>  Senior Account Manager
>  XLSolutions Corporation
>  North American Division
>  1700 7th Ave
>  Suite 2100
>  Seattle, WA 98101
>  Phone: 206-686-1578
>  Email: sue at xlsolutions-corp.com
>  web: www.xlsolutions-corp.com/rcourses
>
>
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help with lattice boxplots...

2010-03-02 Thread Kim Jung Hwa
Thanks a lot All !

On Mon, Mar 1, 2010 at 12:22 PM, Walmes Zeviani
wrote:

>
> In complement to Dallazuanna's solution, use box.umbrella=list() inside
> par.settings() to change the default color and line type specification:
>
> bwplot(y~x, data=ex, pch="|",
>   par.settings=list(box.rectangle=list(col="black"),
> box.umbrella=list(lty=1, col="black"))
>   )
>
>
> Sincerely.
> Walmes Zeviani. Lavras - MG, Brasil.
>
> -
> ..ooo0
>
> ...
> ..()... 0ooo...  Walmes Zeviani
> ...\..(.(.)... Master in Statistics and Agricultural
> Experimentation
> \_). )../   walmeszevi...@hotmail.com, Lavras - MG, Brasil
> 
>
> (_/
> --
> View this message in context:
> http://n4.nabble.com/help-with-lattice-boxplots-tp1573781p1573896.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] help with lattice boxplots...

2010-03-01 Thread Kim Jung Hwa
Hi All,

I need a small help with following code: I'm trying to convert "dashed
lines" to regular ones; and changing default "blue" border color to say
"black"... but I'm doing it wrong and its not working. Can anyone help
please. Thanks,

Code:
require(lattice)
ex <- data.frame(x=1:10, y=rep(c("A","B"), 5))
bwplot(y~x, data=ex,
  panel=function(x,y,...) {
   panel.bwplot(x, y, pch="|", border="black", lty=1,...)
  }
)

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] cloud() / wireframe()

2010-02-25 Thread Kim Jung Hwa
Hi All,

I need some help with how to define:

1. colors in levelplot()

2. fixing labels in auto.key() using wireframe(). Sometimes I get "points"
in legend and sometimes I'm getting different signs for each line like "plus
sign", "star", "circle", etc... how can I be consistent with these. I'm
aware of rectangles=TRUE, line=TRUE... but not sure how am I getting it
different every other time I run same script.

Thanks in advance...
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] wireframe() help {Lattice}

2010-02-11 Thread Kim Jung Hwa
Hi All,

I'm trying a 3D-plot using wireframe() from Lattice package. Below is my
code and sample data (read in "dta" object).

I'm wondering if it is possible to make center grid (curved) line more
prominent (or bold). The curved line I'm talking about is the center
line drawn for a fixed value of log(B) [i.e. log(8)=0.90]. Any help would be
highly appreciated. Thanks in advance.

Code:

library(lattice)
wireframe(C~log(A)*log(B), data=dta, strip=TRUE, shade = TRUE, pretty=TRUE,
 aspect = c(61/87, 0.7),  light.source = c(5,1,10))

Data:

"A","B","C"
0,4,22.66348
0.0625,4,26.71975
0.08839,4,28.39545
0.125,4,30.74843
0.17678,4,34.02359
0.25,4,38.50773
0.35355,4,44.47024
0.5,4,52.02436
0.70711,4,60.91647
1,4,70.3768
1.41421,4,79.27115
2,4,86.59233
2.82843,4,91.90633
4,4,95.37546
5.65685,4,97.46306
8,4,98.64782
11.31371,4,99.2935
16,4,99.63586
22.62742,4,99.81405
32,4,99.90565
45.25483,4,99.95234
64,4,99.976
90.50967,4,99.98794
128,4,99.99395
181.01934,4,99.99697
256,4,99.99848
0,8,53.96374
0.0625,8,56.73697
0.08839,8,57.83093
0.125,8,59.32473
0.17678,8,61.33378
0.25,8,63.97749
0.35355,8,67.34985
0.5,8,71.46838
0.70711,8,76.20942
1,8,81.26487
1.41421,8,86.17732
2,8,90.47885
2.82843,8,93.86382
4,8,96.27334
5.65685,8,97.84582
8,8,98.80233
11.31371,8,99.35346
16,8,99.65849
22.62742,8,99.82243
32,8,99.90871
45.25483,8,99.95345
64,8,99.9764
90.50967,8,99.98808
128,8,99.994
181.01934,8,99.99698
256,8,99.99849
0,16,82.42161
0.0625,16,83.23099
0.08839,16,83.55101
0.125,16,83.98916
0.17678,16,84.58129
0.25,16,85.36725
0.35355,16,86.3852
0.5,16,87.66067
0.70711,16,89.19046
1,16,90.9252
1.41421,16,92.76064
2,16,94.55049
2.82843,16,96.14465
4,16,97.43667
5.65685,16,98.39195
8,16,99.04155
11.31371,16,99.45261
16,16,99.69787
22.62742,16,99.83758
32,16,99.9144
45.25483,16,99.9
64,16,99.97716
90.50967,16,99.98836
128,16,99.9941
181.01934,16,99.99702
256,16,99.9985

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Non-linearity test in R

2010-02-05 Thread Kim Jung Hwa
Hi All,

I'm fitting a linear (multiple) regression model with 3 predictors + their
interactions.

Can anyone suggest some test in R which can help me know whether I need a
non-linear (regression) model or some transformation? I'm mostly concerned
about finding a way to know whether I should fit a Non-linear model...

Thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread Kim Jung Hwa
Hi All,

I'm using glm() in R to perform Poisson regression, I'm wondering if its
possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC
GENMOD).

Thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotting polynomial regression line

2009-12-20 Thread Kim Jung Hwa
Amit, please provide gp.txt file.

On Sun, Dec 20, 2009 at 1:47 PM, Jason Morgan  wrote:

> Hello Amit,
>
> On 2009.12.20 19:35:09, Amit wrote:
> > Dear All,
> > I am trying to plot polynomial regression line to a scatterplot. I did
> > following so far:
> >
> > >x=c(1:9335)
> > >y=read.table("gp.txt",header=T,sep="\t")
> > > length(y$PCC) # y$PCC has values between 1 to 0 in decreasing order
> > [1] 9335
> > > plot(x,y$PCC,col="red") #scatterplot between x and y$PCC
> > > reg=lm(y$PCC~poly(x,6)) # calculating polynomial fit with degree 6
> > > abline(reg,col="blue")
> > Warning message:
> > In abline(reg, col = "blue") :
> >   only using the first two of 7regression coefficients
> >
> > After the above warning a line is drawn in the graph parallel to the
> > y-axis. But I was expecting a curve line through the scatterplot.
> > Am I doing something wrong? Please help!
>
> Take a look at ?predict. Briefly, I think this will give you what you
> want:
>
> > reg <- lm(y$PCC ~ poly(x,6))
> > plot(x, y$PCC, col="red")
> > lines(x, predict(reg), col="blue")
>
> Cheers,
> Jason
>
>
> --
> Jason W. Morgan
> Graduate Student
> Department of Political Science
> *The Ohio State University*
> 154 North Oval Mall
> Columbus, Ohio 43210
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] expression()

2009-12-20 Thread Kim Jung Hwa
Hi All,

I'm wondering if its possible to write degree in symbol.

I would like y-label as "Temperature (degreeF)". where degree should be in
symbols. Thanks in advance,

#R Code
library(lattice)
data(barley)
barchart(yield ~ variety | site, data = barley,
 groups = year, layout = c(1,6),
 ylab = "Temperature (degreeF)",
 scales = list(x = list(abbreviate = TRUE,
       minlength = 5)))
~Kim Jung Hwa

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ggplot2 help.

2009-12-19 Thread Kim Jung Hwa
Hi All,

I'm trying following code and would need help with:

1. Flexibility to move legend inside (top, right, left, etc...). Currently
its overlaying with plot's border.
2. Reducing width/height and making it more compact, with small boxes.

# Requires installing and loading "ggplot2" package
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot(aes(fill = factor(am)))
last_plot() + opts(panel.grid.major = theme_blank())
last_plot() + opts(panel.grid.minor = theme_blank())
last_plot() + opts(panel.background = theme_rect())
last_plot() + opts(axis.line = theme_segment())

Can anyone please suggest something? Thanks in advance,
~Kim Jung Hwa

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] help: forest plots

2009-12-13 Thread Kim Jung Hwa
Thanks for this link. It helps, but I have to make lots of forest plots and
these R scripts are not generic.

Are you aware of similar functions as forest(), which can take input in the
form of estimates, lower_limit, upper_limit? Thanks a lot!

~Kim

On Sun, Dec 13, 2009 at 8:12 PM, C.H.  wrote:

> This one does required the metafor package.
>
> http://tables2graphs.com/doku.php?id=04_regression_coefficients
>
>
>
> On Mon, Dec 14, 2009 at 8:13 AM, Kim Jung Hwa 
> wrote:
> > Hi All,
> >
> > I'm fitting a Poisson regression. And I want to plot 95% Confidence
> Interval
> > of Regression Estimates.
> >
> > After coming back to original scale (using following formula):
> >
> > exponential(estimate +/- 1.96*SE),
> >
> > at best I can get the output in the form of estimates, lower_limit,
> > upper_limit values.
> >
> > As far I know forest() in metafor package needs input in the form of
> > estimates and their variances. In the above case can I still use
> forest()?
> > OR if there exists some other function which takes such input and gives
> > forest plots?
> >
> > Any help would be highly appreciated,
> > Thanks,
> > Kim
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> CH Chan
> Research Assistant - KWH
> http://www.macgrass.com
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] help: forest plots

2009-12-13 Thread Kim Jung Hwa
Hi All,

I'm fitting a Poisson regression. And I want to plot 95% Confidence Interval
of Regression Estimates.

After coming back to original scale (using following formula):

exponential(estimate +/- 1.96*SE),

at best I can get the output in the form of estimates, lower_limit,
upper_limit values.

As far I know forest() in metafor package needs input in the form of
estimates and their variances. In the above case can I still use forest()?
OR if there exists some other function which takes such input and gives
forest plots?

Any help would be highly appreciated,
Thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] forest() in metafor package.

2009-12-13 Thread Kim Jung Hwa
Please ignore this email. Got this link:

http://cran.r-project.org/web/packages/metafor/metafor.pdf

Thanks,
Kim

On Sun, Dec 13, 2009 at 6:14 PM, Kim Jung Hwa wrote:

> Hi All,
>
> I'm using forest() from metafor package to plot forest plots. Here is the
> code
>
> e<-1:6
> v<-seq(2,3,.20)
> forest(e,v)
>
> I want to edit default labels "Study 1", "Study 2" and so on... how can I
> do it?
>
> I tried ?forest(), but couldn't find any details. Any suggestions? Thanks,
> Kim
>
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] forest() in metafor package.

2009-12-13 Thread Kim Jung Hwa
Hi All,

I'm using forest() from metafor package to plot forest plots. Here is the
code

e<-1:6
v<-seq(2,3,.20)
forest(e,v)

I want to edit default labels "Study 1", "Study 2" and so on... how can I do
it?

I tried ?forest(), but couldn't find any details. Any suggestions? Thanks,
Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Frequency tables.

2009-12-11 Thread Kim Jung Hwa
Thank you David and Ista for your suggestions. I got the latex part.

But, this may be stupid, I got the html code using following command, how
can I make use of it? Thanks anyways.

temp<-xtable(summary(Orange))
print(temp, type="html")




 Treeage   circumference
  
1   3:7 Min.   : 118.0
  Min.   : 30.0
2   1:7 1st Qu.: 484.0
  1st Qu.: 65.5
3   5:7 Median :1004.0
  Median :115.0
4   2:7 Mean   : 922.1
  Mean   :115.9
5   4:7 3rd Qu.:1372.0
  3rd Qu.:161.5
6  Max.   :1582.0   
 Max.   :214.0
   




On Fri, Dec 11, 2009 at 9:43 PM, Ista Zahn  wrote:

> There are a variety of packages that help format output using either
> LaTeX or html. I've grown to prefer the latex() function in the Hmisc
> packages, but you might also be interested in xtable (can output
> either to LaTeX or html), R2html, or prettyR.
>
> -Ista
>
> On Fri, Dec 11, 2009 at 6:55 PM, Kim Jung Hwa 
> wrote:
> > Hi All,
> >
> > I'm a SAS user but I'm very much interested in learning R.
> >
> > I use ODS system in SAS to make nice frequency tables. Is it possible to
> > export the output of table() [in TABULAR FORM]? So, that I can use those
> > directly for publications? Thank you.
> >
> > # R Code:
> > library(datasets)
> > Orange
> > summary(Orange) # outputing this, not as it is, but in table for. is it
> > possible?
> >
> > ~Kim
> >
> >[[alternative HTML version deleted]]
>  >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>
>
> --
> Ista Zahn
> Graduate student
> University of Rochester
> Department of Clinical and Social Psychology
> http://yourpsyche.org
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Frequency tables.

2009-12-11 Thread Kim Jung Hwa
Hi All,

I'm a SAS user but I'm very much interested in learning R.

I use ODS system in SAS to make nice frequency tables. Is it possible to
export the output of table() [in TABULAR FORM]? So, that I can use those
directly for publications? Thank you.

# R Code:
library(datasets)
Orange
summary(Orange) # outputing this, not as it is, but in table for. is it
possible?

~Kim

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.