similar to: new.env does not recognize parents from subclasses of "environment"

Displaying 20 results from an estimated 1000 matches similar to: "new.env does not recognize parents from subclasses of "environment""

2005 Feb 01
1
Error in load(dataFile, myEnv)
Dear all, I just found that some of the packages are not able to load any more, after I installed R2.0.1 in my Mac, it even affects my old R1.8 installs. It gives me errors when I load packages that contains "myEnv" settings. such as: RMySQL, DBI, Rggobi, etc. But others that does not require "myENV" is all right, like tcltk that only calls the c functions. The errors
2011 Jul 25
1
do.call in "with" construction
Dear all, I'd appreciate any help to rectify what must be a misconception of mine how environments work: ########################## myEnv <- new.env() myEnv$a.env <- 1 myEnv$symbols.env <- "a.env" a.global <- 2 symbols.global <- "a.global" myFun <- function(symbols){do.call("print", lapply(symbols, FUN=as.name))} do.call("myFun",
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All, In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example: myfun <- function(y) { out <- list(y=y) class(out) <- "myclass" return(out) } print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5)) myfun(1:4) # prints: [1]
2008 Jan 28
1
package.skeleton from within function: objects not found
Hi all, I ran into a strange error: I am trying to create a package skeleton for a new source package from within a function. Objects that are created in this function are to be included in my package, but for some reason, I get an error message saying that these objects cannot be found. Here is the code: ###### myfun <- function(pkgName,x){ myenv <- new.env() apply(x, 1,
2006 Sep 27
1
potential setClass bug (with user-defined environment)
the following returns an error in an 'exists' call on my machine MyEnv <- new.env() setClass("Numeric", "numeric", where=MyEnv) franklin parlamis > version _ platform powerpc-apple-darwin8.7.0 arch powerpc os darwin8.7.0 system powerpc, darwin8.7.0 status beta major 2 minor 4.0 year
2011 Jun 16
7
Problem with usage of arrays
Hi there, i can''t use array in puppet. Here is my codesnipplet: $callapidata = [ ''wert1'',''wert2''] notice $callapidata[1] A puppetrun results in: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert String into Integer at /etc/puppet/myenv/modules/ uc4client/manifests/init.pp:41 on node testnode Thanks for your
2020 May 12
0
S3 method dispatch for methods in local environments
Dear Wolfgang, I think this new behaviour is related to the following R 4.0.0 NEWS item: > S3 method lookup now by default skips the elements of the search path between the global and base environments. Your environment "myenv" is attached at position 2 of the search() path and thus now skipped in S3 method lookup. I have just noticed that
2016 Aug 22
4
How to describe the RegisterInfo?
Hello Everyone, I am trying to make a new LLVM backend target for Intel GPU. I would start from targeting OpenCL language first. But I am not quite familiar with LLVM backend infrastructure. I have some problem on describing the RegisterInfo. Intel GPU launches lots of hardware threads to do GPGPU workload. Each hardware thread has 128 registers(r0-r127), with each one of size 32 byte. Each
2016 Apr 22
0
non-numeric argument to binary operator problem in stock analysis
I use these codes to get the returns of my simulated portfolio but, I can not get returns as the non-numeric argument to binary operator problem in stoc thank you guys first. library(quantmod)library(quadprog)library(stockPortfolio)library(fPortfolio)library(tseries)source("efficientFrontierFunction.r") myenv <- new.env()##Calculate the mean and sd of the monthly returns of each
2009 Jun 17
0
nls with weights
Hi there, I don't have much experience with fitting at all and I'd like to get some advice how to use the "weights"-argument with nls correctly. I have created some data with a sigmoidal curve shape. Each y-Value was generated by the mean of three values. A standard deviation was calculated too. Now, I'd like to weight the data points respective to its standard
2005 Feb 24
4
r: functions
hi all i have a function that uses two inputs, say xdata and ydata. An example is the following, simple1<-function(xdata,ydata) { ofit<-lm(ydata~xdata) list(ofit) } say i use arbitray number for xdata and ydata such that D = x1 x2 y 1 1 10 2 6 6 3 10 7 x<-D[,1:2] and y<-D[,3] if one uses these inputs and rund the program we get the following: >simple(xdata=x,ydata=y)
2005 May 21
2
Possible (ab)use of lexical scoping in R ?
Dear list, I wish to define a set of functions *auxilliary* to another set of "main" ones, and I wonder if there is some "clever" way do do this using lexical scoping. Looking for that in the list's archives did not get me easily understood answers. Perusing MASS (1st, 2nd, 3rd and 4th editions!) and "Programming S" wasn't of much help either... R easily
2018 Nov 29
4
Unexpected argument-matching when some are missing
When trying out some variations with `[.data.frame` I noticed some (to me) odd behaviour, which I found out has nothing to do with `[.data.frame`, but rather with the way arguments are matched, when mixing named/unnamed and missing/non-missing arguments. Consider the following example: myfun <- function(x,y,z) { ? print(match.call()) ? cat('x=',if(missing(x)) 'missing'
2008 Dec 18
1
using jackknife in linear models
Hi R-experts, I want to use the jackknife function from the bootstrap package onto a linear model. I can't figure out how to do that. The manual says the following: # To jackknife functions of more complex data structures, # write theta so that its argument x # is the set of observation numbers # and simply pass as data to jackknife the vector 1,2,..n. # For example, to jackknife #
2008 Apr 18
3
Function redefinition - not urgent, but I am curious
This is just my curiousity working. Suppose I write: f1 <- function(x) x + 1 f2 <- function(x) 2 * f1(x) f2(10) # 22 f1 <- function(x) x - 1 f2(10) # 18 This is quite obvious. But is there any way to define f2 in such a way that we "freeze" the definition of f1? f1 <- function(x) x + 1 f2 <- function(x) # put something here 2 * f1(x) # probably put something else here
2007 Jan 10
2
problems with optim, "for"-loops and machine precision
Dear R experts, I have been encountering problems with the "optim" routine using "for" loops. I am determining the optimal parameters of several nested models by minimizing the negative Log-Likelihood (NLL) of a dataset. The aim is to find the model which best describes the data. To this end, I am simulating artificial data sets based on the model with the least number
2012 Dec 27
2
Bootstrap
Hola, buenas tardes estoy intentando hacer un bootstrap de un modelo, pero me da el siguiente error: "Error in FUN(newX[, i], ...) : unused argument(s) (list(age = c(33, 47, 49, 56, 60, 64, 64, 66, 68, 69, 71, 71, 72, 73, 74, 75, 75, 76, 78, 81, 83, 83, 36, 43, 46, 47, 49, 49, 51, 51, 52, 52, 53, 54, 54, 54, 55, 56, 56, 57, 57, 58, 58, 58, 58, 59, 59, 60, 61, 62, 63, 64, 65, 65, 66, 66,
2012 Sep 13
1
[LLVMdev] Parsing C++ template parameters using cindex.py
Hi, I am parsing a C++ file using cindex.py and want to get the template parameters to a specific node. However, the tree seems to be different depending on if the template parameter is a struct/class or a simple type such as int or float. In the first case the template type is appended as a child to the VAR_DECL node (the TYPE_REF node seen in the example below), but this is not the case with
2008 Sep 10
3
writing simple function through script
Hi all, I try to write a simple function in a script. The script is as follows yo<-function(Xdata) { n<-length(Xdata[,1]) Lgm<-nls(formula=LgmFormula, data=Xdata, start=list(a=1500,b=0.1),weights=Xdata$Qe) return(Lgm) } After the execution of the script, when I call the function yo on data called NC60.DATA I get an error. #yo(NC60.DATA) Erreur dans eval(expr, envir, enclos)
2009 Jul 13
0
Partial Correlation
Why do we get Partial correlation values greater than 1? I have used the default function pcor.mat :-- I have manipulated the default pcor.mat function a bit so ignore tha variables corr_type,element1_in_no,element2_in_no,P.Please ignore the ?pairwise? section and have a look at athe ?listwise ? part i.e else part. *pcor.mat <-