similar to: session logging

Displaying 20 results from an estimated 900 matches similar to: "session logging"

2008 Jul 17
2
nested calls, variable scope
Below is an example of a problem I encounter repeatedly when I write functions. A call works at the command line, but it does not work inside a function, even when I have made sure that all required variables are available within the function. The only way I know to solve it is to make the required variable global, which of course is dangerous. What is the elegant or appropriate way to solve
2009 Oct 12
3
xyplot does not find variable in data
When we call a lattice function such as xyplot, to what extent does the "data" designation cause the function to look inside the "data" for variables? In the examples below, the "subset" argument understands that "Variety" is a variable in the data. But the "scales" argument does not understand that "nitro" is a variable in the data.
2009 Jul 26
1
obtain names of variables and data from glm object
Suppose we have some glm object such as: myglm <- glm( y ~ x, data=DAT) Is there an elegant way--or the "right way" within the R way of thinking--to obtain the names of the response variable, the predictor variables, and the dataset, as character strings? For instance, suppose the "right way" was to use the (currently fictitious) functions theresponse(), thepredictors(),
2009 Oct 10
1
lattice auto.key drop unused levels
The following code produces a legend ("key") that mentions the unused levels of Block. library(MEMSS) xyplot(yield~nitro, subset=(Block=="I" | Block=="II"), data=Oats, group=Block, auto.key=T) and adding "drop.unused.levels=T" does not fix it. And in fact even the following does not solve the problem: xyplot(yield~nitro,
2009 Oct 28
3
variable labels to accompany data.frame
Often it is useful to keep a "codebook" to document the contents of a dataset. (By "dataset" I mean a rectangular structure such as a dataframe.) The codebook has as many rows as the dataset has columns (variables, fields). The columns (fields) of the codebook may include: ? variable name ? type (character, factor, integer, etc) ? variable label
2007 Oct 05
3
Mac GUI and .Renviron
The .Renviron and .First functions do not seem to work the same way on a Mac OS 10.4 as on a Windows XP machine. From working in Windows I am used to creating a new directory for each data analysis project. In the new directory I place First, an .Renviron file consisting of the following text: R_HISTFILE="history.txt" R_HISTSIZE=1000000 Second, an .RData file containing a .First
2009 Aug 05
4
multiple lty on same panel in xyplot
I would like to use lattice graphics to plot multiple functions (or groups or subpopulations) on the same plot region, using different line types "lty" or colors "col" to distinguish the functions (or groups). In traditional graphics, this seems straightforward: First plot all the data using 'type="n"', and subsequently execute a series of "points"
2013 Dec 02
2
plus/minus +/- in factor; not plotmath not expression
I want to put the "plus or minus" symbol into a character variable, so that this can be turned into a factor and be displayed in the "strip" of a faceted ggplot2 plot. A very nice solution, thanks to Professor Ripley's post of Nov 16, 2008; 3:13pm, visible at http://r.789695.n4.nabble.com/Symbols-to-use-in-text-td874239.html and subsequently
2009 Aug 06
1
specify lattice black-and-white theme
Is there a simple way to specify a theme or trellis (lattice) parameters so that, in a multipanel (conditioned) plot, there is no color and in the strips there is no shading? This is the effect achieved on page 124 of Deepayan Sarkar's "Lattice" (figure 7.2). I managed to trick lattice into making a grayscale plot on my interactive display as follows: > graphics.off() >
2009 Aug 07
1
lattice: simultaneously control aspect & outer whitespace
Suppose we wish to achieve the following three aims: (1) Control the aspect ratio of our plot (i.e., tweak this till it looks great) (2) Save the plot as a PDF with zero or minimal white space outside it. (3) Preserve this in code, so that in the future the exact same plot can be reproduced by simply sourcing the code. I can almost achieve (1) and (2) on my MacBook Pro by pointing and clicking,
2004 Aug 04
2
Order of messgaes/ missing messages
I am curious as to why I quite often receive responses to questions on the help before receiving the actual question. For example Mr Graves has responded to Mr Lumley's response to Mr Wegelin yet I ave not received Mr. Lumley's post while I have received the other two. Cheers, Jim [[alternative HTML version deleted]]
2002 Oct 23
3
How to pipe debugmsg to a file?
Is there a wine option to send the log output to a file? I'm doing the following: wineconsole --debugmsg +all program_name parm1 parm2 parm3 > /mylog.txt mylog.txt is not receiving a copy of the millions, nay billions!, of messages output. I'm using Redhat 7.3 and the 10/07/2002 RPMs. - Bill
2010 Mar 04
2
fisher.test gives p>1
The purpose of this email is to (1) report an example where fisher.test returns p > 1 (2) ask if there is a reliable way to avoid p>1 with fisher.test. If one has designed one's code to return an error when it finds a "nonsensical" probability, of course a value of p>1 can cause havoc. Example: > junk<-data.frame(score=c(rep(0,14), rep(1,29), rep(2, 16))) >
2011 Nov 10
1
unable to load Hmisc in R 2.14.0
On my MacBook Pro (OS 10.6.8), after updating to R version 2.14.0 (2011-10-31) and reinstalling the Hmisc package, I am unable to load the Hmisc library. Hmisc was working *before* I updated R. Any idea what's wrong? Details below. > install.packages("Hmisc", dependencies=TRUE) trying URL 'http://cran.case.edu/bin/macosx/leopard/contrib/2.14/Hmisc_3.9-0.tgz' Content
2010 Feb 04
4
xyplot 3 panels 3 different Y variables
Often, when exploring a dataset, I'd like to plot several very different Y variables against the same X variable, in panels stacked one over the other. Is there an easy way to do this? I'd like to achieve an elegant look similar to the look achieved by lattice in conditioned plots--for instance no space between panels. But unlike in straightforward conditioned plot, each panel may be on a
2012 Dec 06
1
scope, lme, ns, nlme, splines
I want to fit a series of lme() regression models that differ only in the degrees of freedom of a ns() spline. I want to use a wrapper function to do this. The models will be of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get an error. fitfunction() below demonstrates this.
2010 Jun 18
1
ggplot2 boxplot: horizontal, univariate
In ggplot2, I would like to make a boxplot that has the following properties: (1) Contrary to default, the meaningful axis should be the horizontal axis. Lattice does this, for instance, by library(lattice);bwplot(~mtcars$mpg) (2) It is *univariate*, i.e., of a single vector, say mtcars$mpg. I do not wish to make separate plots for the different values of mtcars$cyl. (3) Nothing on the
2009 Jul 14
2
SOS! error in GLM logistic regression...
Hi all, Could anybody tell me what happened to my logistic regression in R? mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) It generated the following error message: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor 'state1' has new level(s) AP Thank you!
2012 Apr 27
5
How to cap table with active record
We want to use SQL/active record for logging but limit the table size so that older messages disappear off of the table Some process has to run periodically to do that. Suppose I want to keep my table size to not much bigger than 50,000,000 rows or so. What is the easiest, most efficient way to delete any extra rows that there may be ? This is an SQL/active record problem I have not encountered
2011 Feb 25
1
Small enhancement for CMD check
It would be nice if the 00check.log file also included this part of the output: Running ?bladder.R? Comparing ?bladder.Rout? to ?bladder.Rout.save? ... OK Running ?book1.R? Comparing ?book1.Rout? to ?book1.Rout.save? ... OK Running ?book2.R? Comparing ?book2.Rout? to ?book2.Rout.save? ... OK etc. The survival package has enough test scripts that it exceeds my terminal's scroll