[rkward-users] rkward output issues [TOC and plot parameter modifications].

Sourav Chakraborty schakra1 at uno.edu
Thu Oct 18 00:00:56 UTC 2012


Hi all,

I am using RKward in Ubuntu for a while now. I am fascinated with the
interface and the productivity.

Currently, I am working on a large data sets where summary tables and
plots are important for visualization. I managed to create table and
graphs and pipe them to the output. However, I am having problems with
the output settings.

What I get:
Huge font size in TOC -
http://imageshack.us/photo/my-images/823/rkout1.png/
Considerable blank spaces after the title.
No control on the size of the output image.

What I wish:
Control over each level of TOC fonts and spacings (using some sort of
parameters)
Copy graphs to the output according to a certain specifications (for
example 480 X 240 px) (I can create a desired graph by changing
parameters within RKWard, however, when the graph is copied to output it
goes to default.

There is one last thing:
When I use the following code, I get one graph in the active window (I
am copy pasting code for each variable - which is a crude way to do it,
but I am not really savvy with looping mechanism yet). "Previous and
next" is - grayed out. Usually when I get boxplots from a data within
RKward, I get sequential outputs and I can go back and forth to look at
individual plots.
[img]http://imageshack.us/photo/my-images/94/007kj.png/[/img]

[b]My RKward version:[/b]
RKWard
Version 0.5.7z+0.6.0+pre1
Using KDE Development Platform 4.7.4 (4.7.4)

[b]Here is my kernel version[/b]
3.0.0-26-generic #43-Ubuntu SMP Tue Sep 25 17:19:22 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux

Here is the script and demo data:
# New version of length which can handle NA's: if na.rm==T, don't count
them
library(doBy)
length2 <- function (x, na.rm=FALSE) {
    if (na.rm) sum(!is.na(x))
    else       length(x)
}
cdataNA <- summaryBy(tyr ~ spp + wat + ins, data=demo,
FUN=c(length2,mean,sd), na.rm=TRUE)
# Rename column change.length to just N
names(cdataNA)[names(cdataNA)=="tyr.length2"] <- "N"
levels(cdataNA$wat) <- c(levels(cdataNA$wat), "High")
cdataNA$wat[cdataNA$wat == "Yes"] <- "High" 
levels(cdataNA$wat) <- c(levels(cdataNA$wat), "Low")
cdataNA$wat[cdataNA$wat == "No"] <- "Low"
# Calculate standard error of the mean
cdataNA$tyr.SE <- cdataNA$tyr.sd / sqrt(cdataNA$N)
#Print table at output
rk.header(level = 2, "Summary table - tyr")
rk.print(cdataNA, titles = NULL, align = "left")
# Now create a barplot using ggplot2
library(ggplot2)
a <- ggplot(cdataNA, aes(x = wat, y = tyr.mean, fill = ins))
b <- a + geom_bar(stat = "identity", position = "dodge") + facet_grid (~
spp)
# Now put errorbars.
c <- b + geom_errorbar(aes(ymin=tyr.mean-tyr.SE, ymax=tyr.mean+tyr.SE), 
                  width=.2,                    # Width of the error bars
                  position=position_dodge(.9)) + 
xlab ("wat") + 
ylab ("tyr (PA/PA std)")
c
rk.header("tyr:")
## Copy the displayed plot to the output:
plot (c, align = "left")
dev.copy (device = rk.graph.on)
rk.graph.off ()

Link to demo data: [url]http://pastebin.com/M4iEJUPf[/url]

I appreciate any help on this.

Thanks in advance.

Best,
Sourav

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20121017/bd98de4c/attachment.html>


More information about the Rkward-users mailing list