Displaying 20 results from an estimated 300 matches similar to: "conditioned xyplot, many y variables"
2010 Feb 26
1
match.call to obtain the name of a function
Within a function I'd often like to obtain a text string equal to the name of the function.
One use for this: To generate a filename for use in pdf(). This enables me to keep track of which function generated a particular graphic came.
match.call() puts parentheses at the end of the name. I don't want parentheses in a filename.
The following kludgey function gives the desired result.
2003 Oct 17
1
as.matrix does not turn data frame into character matrix
The as.matrix function behaves in a puzzling manner. The help file says:
"`as.matrix' is a generic function. The method for data frames will
convert any non-numeric column into a character vector using
`format' and so return a character matrix."
But this does not appear to be the case in the following example. Instead,
as.matrix turns a data.frame into a list, not a
2015 Jan 29
2
[Q] Get formal arguments of my implemented S4 method
I wish it didn't have to depend on the name '.local'.
Back when I wrote a lot of S4 methods I avoided the auto-generated .local
and named the local function something that made sense so that is was easier
for a user to track down the source of an error.
E.g., define the generic QQQ with numeric and integer methods:
setGeneric("QQQ",
function(x, ...)NULL)
2015 Jan 29
1
[Q] Get formal arguments of my implemented S4 method
Would we really need the special class or would simply checking the formals
of the method against those of the generic be simple and fast enough?
On Thu, Jan 29, 2015 at 9:41 AM, John Chambers <jmc at r-project.org> wrote:
> I wouldn't want to add more to the current approach; if someone would like
> to devote some time, the much preferable idea IMO would be to replace the
>
2009 Oct 21
1
formula and model.frame
Suppose I have the following function
myFun <- function(formula, data){
f <- formula(formula)
dat <- model.frame(f, data)
dat
}
Applying it with this sample data yields a new dataframe:
qqq <- data.frame(grade = c(3, NA, 3,4,5,5,4,3), score = rnorm(8), idVar = c(1:8))
dat <- myFun(score ~ grade, qqq)
However, what I would like is for the resulting dataframe (dat) to include
2011 Apr 09
1
How do I make this faster?
I was on vacation the last week and wrote some code to run a 500-day
correlation between the Nasdaq tracking stock (QQQ) and 191 currency pairs
for 500 days. The initial run took 9 hours(!) and I'd like to make it
faster. So, I'm including my code below, in hopes that somebody will be able
to figure out how to make it faster, either through parallelisation, or by
making changes. I've
2010 Jul 08
5
No space left on device on not full filesystem
Hello,
We have running lustre 1.8.1 and have met "No space lest on device"
error when uploading 500 Gb small files (less then 100 Kb each).
The problem seems to depends on the number of files. If we remove one
file, we can create one new file, even with Gb size; but if we haven''t
remove something we can''t create even very little file, as an example
using touch
2006 Mar 28
3
Running text app without X
I'm sure this question comes up waaaay to often in this
list, and I apologize if I've missed the obvious answer.
I did spend the last two hours looking for a solution
and trying various things, but to no avail.
I'm trying to run a command-line app (text-only). It's a
cross-compiler tool for which we only have Windows binaries.
The app works fine, but when I run it (i.e. to
2010 Nov 26
3
Calling substitute(expr, list(a=1)) when expr <- expression(a+b+c)
# The result I am after is the result after a substitution in an expression, such as
substitute(expression(a+b+c), list(a=1))
expression(1 + b + c)
# However, the way I want to do it is for a an expression "stored as a variable" as
(expr <- expression(a+b+c))
expression(a + b + c)
# a) The following does not work
(expr2 <- substitute(expr, list(a=1)))
expr
# b) - whereas this
2010 Jul 22
1
How do I get rid of list elements where the value is NULL before applying rbind?
Here is the function that makes the data.frames in the list:
funweek <- function(df)
if (length(df$elapsed_time) > 5) {
res = fitdist(df$elapsed_time,"exp")
year = df$sale_year[1]
sample = df$sale_week[1]
mid = df$m_id[1]
estimate = res$estimate
sd = res$sd
samplesize = res$n
loglik = res$loglik
aic = res$aic
bic = res$bic
chisq =
2020 Mar 05
3
Should rint and nearbyint be always constrained?
+cfe-dev as the discussion is now biased toward C standard.
I'm not sure what problem you see here. In default mode, i.e.
> when there is no "#pragma STDC FENV_ACCESS on" in effect,
> then the compiler can always assume that the default rounding
> mode is in effect.
Well, if #pragma STDC FENV_ACCESS on is not in effect, that means
> that the user has promised that at
2008 Feb 07
1
samba-3.0.25b-1.el4_6.4
I would appreciate any ideas on how to correct the problem that we are
having that is outlined below. Thanks for your help.
I have been running samba for a long time. Currently we are having
problems with it filling up /var/log/messages with
Feb 7 10:45:02 servername smbd[2157]: Can't become connected user!
Feb 7 10:45:02 servername smbd[2158]: [2008/02/07 10:45:02, 0] smbd/
2015 Jan 29
0
[Q] Get formal arguments of my implemented S4 method
I wouldn't want to add more to the current approach; if someone would like to devote some time, the much preferable idea IMO would be to replace the whole mechanism.
Here's one suggestion:
1. have a class, say "nonConformingMethod" for method definitions that diverge in the argument list.
2. the internal dispatch code checks the class of the selected definition (this can
2008 Feb 28
1
Plotting Dendrogram Help Getting Plot to Display Neatly
I have done a cluster analysis doing:
1-clusNorth <-hclust(dist(Artorious)^2, method="ward")
2-clusNorth$labels <-Artorious$Name ## to show the case names and not
numbers
3-dend1 <- as.dendrogram(clusNorth)
4-plot(dend1)
My Dendrogram is now showing the names of my cases in the dataframe on
the x axis
1 OMNICELL INC COM
2 GETTY IMAGES INC
2007 Dec 30
6
OggPCM: support for little-endianness only?
List,
A recent discussion over on XiphWiki is trying to decide if OggPCM
should support only little-endianness or the usual combo of big and
little.
It started with the following statement by an user (Qqq):
"Portable players are usually ARM, which is usually little-endian. The
Macintosh is now little-endian. Obviously the PC is little-endian.
Clearly there is a winner. It's long past
2015 Jan 29
3
[Q] Get formal arguments of my implemented S4 method
On Jan 28, 2015, at 6:37 PM, Michael Lawrence <lawrence.michael at gene.com> wrote:
> At this point I would just due:
>
> formals(body(method)[[2L]])
>
> At some point we need to figure out what to do with this .local() confusion.
Agreed, definitely. The current hack is to avoid re-matching arguments on method dispatch, so a fix would need to be fairly deep in the
2009 Sep 28
2
Polynomial Fitting
Hello All,
This might seem elementary to everyone, but please bear with me. I've
just spent some time fitting poly functions to time series data in R
using lm() and predict(). I want to analyze the functions once I've
fit them to the various data I'm studying. However, after pulling the
first function into Octave (just by plotting the polynomial function
using fplot() over
2004 Jan 08
2
Sweave & xtable
I am just starting to learn Sweave (really neat tool). I am pretty
early in the learning curve (I had to think a moment ago whether a # or
% was the appropriate comment character).
I have successfully incorporated simple graphics and outputs, but am
having trouble getting a latex (xtable) table to function properly.
Latex is seemingly treating the xtable code as input or verbatim text.
That
2024 Jul 10
1
Issues with Ubuntu 22.04 and Installing the Latest Version of R (R 4.4.1) to Docker Image
Lauren,
I am now back home where looking into these things is a little easier. From
your first email to me, I started off with the selenium container you
mentioned as your starting point.
And that basically is your issue. It is a 'high-level' container, and it sets
a user. (Essentially) all other Dockerfiles you have seen and been pointed at
are 'lower-level' and operate as root
2009 Mar 21
1
Forestplot () box size question
Hi All,
I have been able to modify the x-axis to start at zero by adding xlow
and xhigh parameters; that was pretty simple. I have been unable to
find the location of the code that would turn off the information
weighting of the box size (I have smaller randomized trials getting
less weight than a much larger non-randomized trial). The function
is forestplot() from rmeta.
Thanks for any