Displaying 20 results from an estimated 30000 matches similar to: "update.default evaluating in wrong environment?"
2007 Jun 08
1
evaluating variables in the context of a data frame
Given
> D = data.frame(o=gl(2,1,4))
this works as I expected:
> evalq(o, D)
[1] 1 2 1 2
Levels: 1 2
but neither of these does:
> f <- function(x, dat) evalq(x, dat)
> f(o, D)
Error in eval(expr, envir, enclos) : object "o" not found
> g <- function(x, dat) eval(x, dat)
> g(o, D)
Error in eval(x, dat) : object "o" not found
What am I doing wrong?
2011 Nov 24
1
capture.output(eval(..., envir)) not evaluate in the expected(?) environment
I've noticed the following oddity where capture.output() prevents
eval() from evaluating an expression in the specified environment.
I'm not sure if it is an undocumented feature or a bug. It caused me
many hours of troubleshooting. By posting it here, it might save
someone else from doing the same exercise.
Start by defining foo() which evaluates an expression locally in a
given
2013 Sep 02
3
Product of certain rows in a matrix
Hi,
You could try:
A<- matrix(unlist(read.table(text="
1 2 3
4 5 6
7 8 9
9 8 7
6 5 4
3 2 1
",sep="",header=FALSE)),ncol=3,byrow=FALSE,dimnames=NULL)
library(matrixStats)
?res1<-t(sapply(split(as.data.frame(A),as.numeric(gl(nrow(A),2,6))),colProds))
?res1
#? [,1] [,2] [,3]
#1??? 4?? 10?? 18
#2?? 63?? 64?? 63
#3?? 18?? 10??? 4
2010 Jul 16
2
[LLVMdev] LLVM and Visual Studio
Hi,
What's the status of LLVM on Visual Studio?
In particular, our application would like to generate some LLVM code,
then call into it. Is this possible with the JIT compiler? Is it
possible by creating & loading a .dll?
Thanks,
Martin
2010 Dec 08
4
evaluating NAs in a dataframe
Hi all,
How can one evaluate NAs in a numeric dataframe column? For example, I have
a dataframe (demo) with a column of numbers and several NAs. If I write
demo.df >= 10, numerals will return TRUE or FALSE, but if the value is
"NA", "NA" is returned. But if I write demo.df == "NA", it returns as "NA"
also. I know that I can remove NAs, but would like
2024 Jul 06
1
Bug? plot.formula does need support plot.first / plot.last param in plot.default
? Fri, 05 Jul 2024 14:35:40 +0300
"Erez Shomron" <r-mails at erezsh.org> ?????:
> This works as expected:
> with(mtcars, plot(wt, mpg, plot.first = {
> plot.window(range(wt), range(mpg))
> arrows(3, 15, 4, 30)
> }))
I think you meant panel.first, not plot.first. At least I cannot find
any mention of plot.first in the R source code. In this example,
2004 Mar 23
1
influence.measures, cooks.distance, and glm
Dear list,
I've noticed that influence.measures and cooks.distance gives different
results for non-gaussian GLMs. For example, using R-1.9.0 alpha
(2003-03-17) under Windows:
> ## Dobson (1990) Page 93: Randomized Controlled Trial :
> counts <- c(18,17,15,20,10,20,25,13,12)
> outcome <- gl(3,1,9)
> treatment <- gl(3,3)
> glm.D93 <- glm(counts ~ outcome +
2018 Mar 09
2
wrong size displayed with df after upgrade to 3.12.6
Dear all,
I have a problem with df after I upgraded from 3.12.4 to 3.12.6
All four bricks are shown als online, and all bricks are being used.
gluster v stats shows the correct sizes for all devices.
However, df does not show the correct glusterfs volume size.
It seems to me that it "forgets" one brick. Although all bricks are used when I'm writing files.
best wishes,
Stefan
2018 Mar 09
1
wrong size displayed with df after upgrade to 3.12.6
Hi Stefan,
There is a known issue with gluster 3.12.x builds (see [1]) so you may be
running into this. Please take a look at [1] and try out the workaround
provided in the comments.
Regards,
Nithya
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1517260
On 9 March 2018 at 13:37, Stefan Solbrig <stefan.solbrig at ur.de> wrote:
> Dear all,
>
> I have a problem with df after
2008 Jun 26
2
wrong permission
Im still finding a number of control directories that have the wrong
permission:
Jun 26 00:02:34 userimap13.xs4all.nl dovecot: IMAP(xxx): file_dotlock_create(/var/spool/mail/dovecot-control/g/gl/xxx/INBOX/.Apple Mail To Do/dovecot-uidlist) failed: Permission denied
userimap1# ls -al "/var/spool/mail/dovecot-control/g/gl/xxx/INBOX/.Apple Mail To Do" total 8
drw------- 2 xxx user 4096
2005 Feb 24
2
other than default labels in lattice plot
Dear all
I solved a problem of customised labels on strips and boxes in bwplot
by this construction.
> bbb <- bwplot(zavoj ~ typmleti | pu)
> bbb$condlevels$pu <- c("Povrchov? ?prava", "Bez PU")
> bbb$x.limits <- c("Mleto", "Mleto a s?tov?no", "Nemleto")
> bbb
but I wonder if some other easy option exist. Let say something
2017 Jul 31
0
force promises inside lapply
quote(expr) will make no changes in expr, it just returns its one argument,
unevaluated.
substitute could be used in your lapply(..., library) example to give
library a name instead
of a character string for an input (which might be necessary if the
character.only argument
were not available)
lapply(c("MASS", "splines"), function(pkg)
eval(substitute(library(pkg),
2009 Apr 29
2
if condition doesn't evaluate to True/False
Hi friends,
Please help me with this bug.
*Bug in my code:*
In this variable sub_grp_whr_cls_data[sbgrp_no,1] I store the where
clause.every sub group has a where condition linked with it.
Database1
Where clause was not found for a particular subgroup,
sub_grp_whr_cls_data[sbgrp_no,1] value was NULL
So the condition (*sub_grp_whr_cls_data[sbgrp_no,1]=="NULL" ||
2006 Dec 30
2
Evaluating Entire Matlab code at a time
Hi.
On 12/30/06, Bhanu Kalyan.K <kalyansikha at yahoo.com> wrote:
> Dear Mr.Bengtsson,
>
> The steps you have suggested are working for single lines of matlab
> statements. But, as i mentioned earlier, If i want to see the output of an
> entire matlab code (say swissroll.m) then you suggested me to do
> res <- evaluate(matlab, "swissroll").
> When i did
2005 Aug 12
6
evaluating string variables
Hello!!!
I have a folder (C:/R/) with matrix files, named by number, i.e.
0.mat, 1.mat,...,1250.mat. In this case, they are 5x5 simetric
matrices. I would like to compute a property for each matrix and put
calculated values into a data frame for posterior ploting and
printing. Below there is an example for 7 matrices (0.mat..6.mat)
#define data frame
L <- data.frame(frame=numeric(7),
2013 Nov 08
5
[LLVMdev] Proposal for safe-to-execute meta-data for heap accesses
> On Nov 8, 2013, at 1:13 AM, Chandler Carruth <chandlerc at google.com> wrote:
>
>
>> On Thu, Nov 7, 2013 at 9:39 PM, Filip Pizlo <fpizlo at apple.com> wrote:
>> NEW PROPOSAL
>>
>> The solution is to introduce meta-data that is explicit about how the safe-to-execute condition ought to be evaluated. Instead of an SSA use, we can have meta-data that
1999 Jun 15
1
Accessing a function's environment
In a short course he is teaching here, Bill Venables has shown how to
cache the results of a recursive calculation so that later invocations
of the functions are speeded up. His example is an ingenious way of
calculating all the subsets of size r from a set of size n.
His version of this function for R stored these cached values in the
global environment. I suggested that it might be preferable
2007 Apr 17
6
Evaluating variables in Rails views -- help!
I''m building my first Rails application, and things are going OK for the
most part except for stupid little stuff like this that I simply can''t
figure out (it''s always the little things, isn''t it?).
<% for p in @pages %>
<li<% if (params[:id] == p.id) %> class="current"<% end %>><%=
link_to(p.name.capitalize, :action =>
2012 Jul 27
1
Version of substitute that evaluates it's first argument
Hi all,
Does there already exist a version of substitute that evaluates it's
first argument? (i.e. it accepts an already quoted expression). This
seems like something that's pretty handy, but I haven't found any
existing function to do it:
substitute_e <- function(expr, env) {
eval(substitute(substitute(expr, env), list(expr = expr)))
}
f <- quote(x + y + z)
substitute(f,
2005 Jul 26
1
evaluating variance functions in nlme
Hi,
I guess this is a final plea, and maybe this should go to R-help but
here goes.
I am writing a set of functions for calibration and prediction, and to
calculate standard
errors and intervals I need the variance function to be evaluated at new
prediction points.
So for instance
fit<-gnls(Y~SSlogis(foo,Asym,xmid,scal),weights=varPower())