Displaying 20 results from an estimated 1000 matches similar to: "Two variables on one lattice barchart"
2009 Mar 22
5
If statement generates two outputs
Hi,
How do I tell an if statement to generate two seperate outputs.
E.g If X>5 I want to create df1 and df2:
if (X>5) {df1<-c(4,5,6,7,8) AND df2<-c(9,10,11,12,13)}
Thanks,
James
--
View this message in context: http://www.nabble.com/If-statement-generates-two-outputs-tp22650844p22650844.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jan 07
2
Plotting a graph for every Level of a Factor
Hello,
I'm sorry if this seems similar to my last post but I thought it was
significantly different to warrent a new thread. Using the dataset below,
is there a way to generate a bar/line plot for the TACC/Catch of every lvl
of stock? i.e. OR1,OR3,OR5. The picture at the bottom of this post is an
example of the bar/line plot for OR1 which was generated when OR1 was the
only stock in the
2009 Feb 24
4
Help with Latex (Hmisc)
Dear R Users,
I have three questions.
1) Is there a way to get the output tex file to include
\documentclass{report}
\begin{document}
and
\end{document}
so I can generate a PDF straight away. (I am trying to generate hundreds of
these and don't want to have to manually type this in every time I load a
tex file).
2) When I have have a table of greater than 9 columns, the columns to
2009 Apr 14
1
Lattice xyplot: Line and Rectangle in legend.
Hello fellow R users,
I have a problem. I have created a barchart overlayed by an xyplot line,
both of which read off the same Y axis. The problem comes when I try to
generate a key. It seems that I can only create either two lines, or two
rectangles. I would much prefer to have the barchat series depicted by a
rectangle, and the xyplot series by a line. Is there a way to do this?
Your help
2009 Mar 10
5
2 Simple Lattice Plot Questions
Hi,
I have created the plot below and have a few questions about changes.
1) How do I change the "Year" title of each plot so it reads from the top
"2006","2007","2008","2009".
2) How do I get rid of those vertical grey bars in the title bar of each
plot?
I apologise for my ignorance... one of those days :(
James
2009 Jan 14
1
Help with Plot/Legend
Dear R-Users
I have 2 questions:
Firstly, If I create a matplot and legend for multiple vectors and then tag
another vector on using matlines (e.g. a 'total' of all vectors), is there
anyway to add the new line to the legend without recreating it? I have
created the plot this way because I would like to define the lty and lwd for
the 'total' vector so that it can be
2009 Feb 11
1
Table Formatting
Dear R-Users
I have created the following table in R:
Year TACC.SNA1 Catch.SNA1 TACC.SNA2 Catch.SNA2 TACC.SNA3
Catch.SNA3
111 1985-86 9396 18595 1860 530
1486 16727
112 1986-87 3155 12195 9506 7067
4991 2300
113 1987-88 6913 2074 3740
2009 Jan 07
1
Bar Plot with Connected Points on 1 Y-Axis
Hi Everyone,
Have created a bar plot of the data below using the following code:
barplot(TACC,space=0,names.arg=Year). I now want to add a series of
connected points to represent the catch. I tried to do this using
line(Catch) or points(Catch), however both of these commands result in each
data point being aligned with the right edge of each bar. I need them to be
solid points in the centre of
2009 Oct 05
2
Loop function/comparison operator problem
Hi There,
I have created the following function
format<- function(){
repeat {
form<-readline(paste("\nIn what format do you want to save these
plots?\nChoose from: wmf, emf, png, jpg, jpeg, bmp, tif, tiff, ps, eps, or
pdf.\nNote: eps is the suggested format for publication quality plots.\nPlot
format --> "));
cat("\nI'm sorry, I don't know what that format
2009 Jul 27
2
Split rownames into factors
Hi Guys,
I was wondering how you would go about solving the following problem:
I have a list where the grouping information is in the row names.
Rowname [,1]
X1Jan08 324
X1Jun08 65
X1Dec08 543
X2Jan08 23
X2Jun08 54
X2Dec08 8765
X3Jan08 213
X3Jun08 43
X3Dec08 65
How can I create the following dataframe:
Value Date Group
[1,] 324 Jan 08 X1
[2,] 65 Jun 08
2009 Oct 01
2
Re gression for levels of a factor/xyplot type="r"
Hi,
I'm sure these are basic problems so I apologise in advance for my
ignorance. I have a dataset with X, Y, and a Factor with 4 levels. I am
trying to figure out how to use lm() to find the r2 value, slope and
intercept of an X~Y regression, for each level of the Factor. Is there a
way to do this automatically without having to specify different subsets of
the factor?
my code so far:
2009 Jan 15
1
Zoo Plot Can't Get Rid of Box
Hi,
I apologise for the stupid question but how to you get rid of the box around
a plot in the package zoo? I can't seem to find an equivalent for bty="l"
i.e. just x and y axis.
Cheers
James
--
View this message in context: http://www.nabble.com/Zoo-Plot-Can%27t-Get-Rid-of-Box-tp21468452p21468452.html
Sent from the R help mailing list archive at Nabble.com.
2015 Feb 24
3
alternatives to do.call() when namespace is attached but not loaded?
Dear R-devel
I have a function in a package that essentially provides a wrapper for a
group of functions in another Suggested package (it sets appropriate
defaults for the context, transforms output, etc). I've implemented
this by verifying that the package was loaded with
require(sna)
and then
do.call(snaFunName, args = args)
The rDevel check is requesting that I use
2007 Nov 10
1
about R sna package source code
Is anyone know some thing about sna package source code??
I have a question about sna source code,
I need some functions in R sna package,
so I check the source code.
There is a function called efficiency in sna package, but I didn't find the
any code about "efficiency",
anyone know it?
thank you
[[alternative HTML version deleted]]
2005 Mar 15
1
How do I call a masked function in a package without a namespace?
Hello,
I work with two packages sna and graph from CRAN resp. Bioconductor. Both
packages have a function called "degree". Therefore one of the functions
is masked by the other and which one gets called depends on the order of
loading. The problem is that both package do not have a namespace,
therefore calling the masked function with "package::degree" does not
work.
2004 Apr 02
3
social network bug! (PR#6729)
Full_Name: Yoon, hye sung
Version: 1.8.1
OS: window
Submission from: (NULL) (203.255.177.155)
> library(sna)
Warning message:
package sna was built under R version 1.9.0
>
What's this message mean?
2009 Jul 14
1
Error installing package sna
Dear R-users,
These days, I have been struggling to install the package sna on my Ubuntu
8.04 laptop. My R version is currently R 2.7.2. And I had no trouble
installing any other packages (including network).
However when I run 'install.packages("sna")', compilation of C codes is ok,
but a syntax error is reported when building help pages and sna does not
want to install.
I
2009 Jan 21
1
Text Outside Lattice Plot
Dear R users
I created the graph at the bottom using xyplot in the lattice package. I
added a title using the main="Title" command in xyplot, however it is
plotted too close to the legend for my liking. To remedy this I increased
the upper margin of the plot using plot(data, position = c(0,0,1,.9)) and
attempted to move "SNA" upwards and to the right. I have tried using a
2008 Feb 27
1
how to convert a table to adjacency matrix used in social network analysis?
Hi Guys,
Do you any one know how to convert a long format table to an adjacency
matrix used in sna? The long table looks like
p1 p2 counts
a b 100
a c 200
a d 100
b c 80
b d 90
b e 100
c d 100
c e 40
d e 60
and I want to convert it to an adjacency matrix which can be used in sna?
Any methods will be appreciated!
btw, besides sna package, is there any better package can be used in social
2009 Nov 06
3
Calculate Mean for each Treatment/Trial Interaction in DF
Hi,
I am create a new DF that summarizes the mean angle per treatment/trial, of
the original DF (see below). I have had some success using:
(tapply(df$Angle, INDEX=interaction(df$State,
df$Trial), FUN=mean)); however, this gives the answer as a list, which
means I would have to split the name to get the categories back. Does
anyone know a simple way to transform the Original DF into Summary