similar to: If statement generates two outputs

Displaying 20 results from an estimated 300 matches similar to: "If statement generates two outputs"

2009 Mar 03
0
Two Column-group names using Latex(Hmisc)
Hi, Using the following code I can generate the attachment "Original.pdf": latex(test, file="C:/Documents and Settings/darej/My Documents/James/READY.tex", title = "", rowname = NULL, cgroup = c("Fishstock", stocknames), n.cgroup = c(1, rep(2,nostocks)), colheads = c("Year", rep(c("Catch",
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 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 Mar 29
1
Two variables on one lattice barchart
Hi, I created the barchart below using the lattice package, however I can't seem to find a way to add another variable as a line (see the desired square/lines that I drew for the last 10 years of the plot). Can anyone help me with this? Your help is much appreciated! Code: Schart<-barchart(Catch~Year,data=SNA, scales=list(col = "black", tck = c(1, 0),x=list(rot=45)))
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
2007 Feb 01
1
xtable and column headings
When I generate a LaTeX table using xtable I have been setting column names to strings with LaTeX code in order to get features like subscripts in the column headings. I recently had to reinstall xtable and discovered that all my LaTeX column headings were printing out in LaTeX code rather than with LaTeX formatting. For example, with the older xtable I could give my column a name something like
2006 Nov 29
1
simple R question
Hi, I am new to this, can anyone help. I am working with matrices, with stocknames as colNames and dates as rowNames. The data coontains percentile ranking for the stocks. Date IBM MSFT 20061122 12 4 20061115 12 4 20061108 12 4 20061101 12 4 20061025 12 4 20061018 12 4 20061011 11 3 20061004 12 3 20060927 10 3 I would like to calculate the
2006 Mar 13
1
Formatting an anova table using latex
Hi r-helpers, When I issue the command latex(anova(raw1.lmer0, raw1.lmer, raw1.lmerI), file = 'raw1.tex', rownamesTexCmd = c('baR', 'addit', 'multip'), longtable = F, dcolumn = T, booktabs = T, t able.env = F, colheads = NULL, colnamesTexCmd = c ('', 'df', 'aic', 'bic', 'logl', 'chisq', 'chisqdf',
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 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
2009 Nov 04
1
[PATCH] nv10/exa: Spring-cleaning
* Kill the A8+A8 hack. Recent enough X servers (>=1.7) fall back to ARGB glyphs for drivers not supporting A8 render targets. * Kill all the global state. It doesn't matter a lot yet but it might if we get multicard working at some point. * Other random clean-ups with no functional changes. Some numbers from x11perf -aa10text -aa24text -comppixwin10 -comppixwin500: * Before, with A
2006 Oct 28
1
(kein Betreff)
Frank Harrell rote in a message dating from Oct 8th: > n.group is an argument to latex.default in the Hmisc package I must admit that I can't find it in the function head, which reads on my installation: function (object, title = first.word(deparse(substitute(object))), file = paste(title, ".tex", sep = ""), append = FALSE, label = title, rowlabel = title,
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:
2011 Aug 31
1
Hmisc Latex Question: column headings and Major Column Headings not properly alligned
Dear R users: When I create a table without Major Column headings, my *regular* column headings appear correct in the typeset latex file. The major row heading and row groups are as they should. w <- latex(mytab,title="",file="tab/my.tex",ctable=TRUE,caption="Descriptive statistics by
2013 Feb 15
1
file copy to password protected network drive
I am trying to copy files to a password protected drive which is "Ranch" at TACC from another network drive. I am logged in to the source drive and can run R there. The following code does not even find the destination folder. file.copy("sourcedrive/file.tar", " username@ranch.tacc.utexas.edu/uniqueID/destinationfolder/file.tar", overwrite = FALSE) Thanks in
2011 Sep 12
2
[LLVMdev] llvm-gfortran problems
Hmm.. I didn't explain the problem completely last time. I am creating a drop-in replacement for gcc and gfortran that runs an additional pass on the bitcode before generating the native binary. Here's whats happening: If the source code compilation process builds a static library (.a archive file), I need a means to link the `.a' file statically into the application. So if the
2009 Apr 15
1
savePlot error when type = "eps" or "wmf"
Hello, When I use savePlot(filename="xy",type="eps") or savePlot(filename="xy",type="wmf") , I get the following error: Error in grid.Call("L_textBounds", as.graphicsAnnot(x$label), x$x, x$y, : Polygon edge not found (zero-width or zero-height?) This doesn't occur when I change the type to "jpeg" or "bmp". Can