similar to: Functions within functions - environments

Displaying 20 results from an estimated 1100 matches similar to: "Functions within functions - environments"

2012 Oct 05
2
Using variables from different environments in one function
Dear R-community, I have been experiencing this issue with functions within a function and I can kind of feel where the problem is (environments, closures etc), but I don't manage to solve it. I will sketch it with an example: #We have two simple "inner" functions: ############## INNER FUNCTION1 ################# innerfunction1<-function() { ab<-a+b
2015 Sep 29
3
making object.size() more meaningful on environments?
Hi, Currently object.size() is not very useful on environments as it always returns 56 bytes, no matter how big the environment is: env1 <- new.env() object.size(env1) # 56 bytes env2 <- new.env(hash=TRUE, size=75000000L) object.size(env2) # 56 bytes env3 <- list2env(list(a=runif(25000000), L=LETTERS)) object.size(env3) # 56 bytes This makes it pretty useless on
2009 May 08
2
partial mantel tests "Ecodist"
Hi all, I'm searching for a little clarification on partial mantel tests (ecodist package) I've a distance matrix (x,y), and several others containing environmental/chemical variables. Based on the help file, and the package instructions I've managed to implement the tests as; var1 ~ env1 + space to partial out the effect of space and test the relationship between the
2015 Sep 29
1
making object.size() more meaningful on environments?
Hi Gabe, On 09/29/2015 02:51 PM, Gabriel Becker wrote: > Herve, > > The problem then would be that for A a refClass whose fields take up N > bytes (in the sense that you mean), if we do > > B <- A > > A and B would look like the BOTH take up N bytes, for a total of 2N, > whereas AFAIK R would only be using ~ N + 2*56 bytes, right? Yes, but that's still a *much*
2010 Aug 05
1
plot points using vis.gam
Hello, I'm trying to illustrate the relationships between various trait and environment data gathered from a number of sites. I've created a GAM to do this: gam1=gam(trait~s(env1)+s(env2)+te(env1,env2)) and I know how to create a 3D plot using vis.gam. I want to be able to show points on the 3D plot indicating the sites that the data came from. I can do this on a 2D plot when there is one
2005 Jul 13
3
nlme, MASS and geoRglm for spatial autocorrelation?
Hi. I'm trying to perform what should be a reasonably basic analysis of some spatial presence/absence data but am somewhat overwhelmed by the options available and could do with a helpful pointer. My researches so far indicate that if my data were normal, I would simply use gls() (in nlme) and one of the various corSpatial functions (eg. corSpher() to be analagous to similar analysis in SAS)
2010 Jun 07
1
undefined method 'to_sym' for ["<var>", "<var">]:Array
I am running into a problem with my LDAP puppet setup with this error message: PuppetClient: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment DR: undefined method `to_sym'' for ["ENV1", "ENV2"]:Array PuppetMaster: err: Could not parse for environment DR: undefined method `to_sym'' for ["ENV1",
2013 Dec 17
1
Geppetto complains about uninitialized variables in reduce function
Hello, I''m using the following expression to format a list: $valid_environments = [''env1'', ''env2'', ''env3''] $env_message = $valid_environments.reduce |$message, $env| { "${message}, ${env}" } It works at run-time (Puppet 3.2.4 standalone with "--parser=future"). However in Eclipse (v4.3.1),
2012 Feb 13
2
Puzzling... puzzling... puzzling...
Hi all, I made sure that it's "env$sRes1$nPositionsOptimizedM" that's correct... not the "env$sRes1$nPositionsOptimized"... But it seems both point to the same memory area... This is very dangerous because I have used naming conventions such as: MyLongVariableNameForA MyLongVariableNameForB MyLongVariableNameForC ... ... Then if internally they are actually the
2015 Feb 18
1
Different serialization of functions in interactive vs. batch mode
Hi Gabriel, thanks for your reply - it does solve the problem of my toy function, but does come with some other problems though. a) as.list(f)[[1]] yields an expression, not a function. In order to go the route you are suggesting, I would more likely use "deparse" in order to get the original back b) and more seriously - as.list strips the environment of the function (and thus
2017 Jul 30
1
Add Anova statistics in each figure
Hi R Users, I created interaction plots in ggplot2 and was trying to add output of two way ANOVA models, especially only interaction ( example treatment*control F(XX, XX) = xxx, p = xxx) into figures, but i was not able to add. Would you mind to help on how I can add information into each figure? I have attached the example data and the code that I used for this. dat<-structure(list(Sites
2007 Sep 18
1
Re-attaching a package environment drops the attributes
Hi. contrary to other environments, the attributes of a *package* environment are dropped (from the new environment) when attach():ing it to the search() path. This might or might not be surprising, but have some side effects if rearranging/attaching package environments. # Example - Regular environments env <- new.env() attr(env, "foo") <- "bar" print(env) ##
2007 Jan 07
2
environmentName
I noticed the new environmentName in R 2.5.0dev. Thus I gather that each environment has: (1) a name (2) a hex value so 1. environmentName gets the name. Is there any way to set the name? 2. is there any way to get the hex value for an environment other than doing: e <- new.env() capture.output(e)
2016 Sep 03
19
[Bug 97588] New: Disconnecting/Reconnecting monitor results in 'laggy' graphics and disappearing mouse cursor
https://bugs.freedesktop.org/show_bug.cgi?id=97588 Bug ID: 97588 Summary: Disconnecting/Reconnecting monitor results in 'laggy' graphics and disappearing mouse cursor Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal
2001 Apr 18
4
squelch-1.0beta12 released
<ad> .q.u.e.l.c.h is an audio player dedicated to Ogg Vorbis. This is a bugfix release. RPMs available for i386, i486, i586, i686 and Athlon. Source available as tar.gz, tar.bz2 and src.rpm. http://www.geoid.clara.net/rik/squelch.html Tested on Linux, may work elsewhere. Requires only Vorbis, libao and Qt (compiled with thread support.) </ad> Have fun ;) Rik --- >8 ----
2008 Aug 06
3
[PATCH RFC] do_settime is backwards?!
While digging through the time code, I found something very strange in do_settime: x = (secs * 1000000000ULL) + (u64)nsecs - system_time_base; y = do_div(x, 1000000000); spin_lock(&wc_lock); wc_sec = _wc_sec = (u32)x; wc_nsec = _wc_nsec = (u32)y; spin_unlock(&wc_lock); The value "x" appears to be the number of nanoseconds, while the value
2018 Mar 07
1
gluster for home directories?
Hi, On 2018-03-07 16:35, Ondrej Valousek wrote: > Why do you need to replace your existing solution? > If you don't need to scale out due to the capacity reasons, the async > NFS server will always outperform GlusterFS The current solution is 8 years old and is reaching its end of life. The reason we are also looking into gluster is that we like that it uses standard components
2001 Dec 12
2
f-test
Hello, I'm using R to do statistics on datasets, and now I need an f-test, which I can't find in R. Is there such a thing as an f-test. T-test seems to work fine, but .. Regards, Rik -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2018 Mar 07
4
gluster for home directories?
Hi, We are looking into replacing our current storage solution and are evaluating gluster for this purpose. Our current solution uses a SAN with two servers attached that serve samba and NFS 4. Clients connect to those servers using NFS or SMB. All users' home directories live on this server. I would like to have some insight in who else is using gluster for home directories for about 500
2002 Apr 09
3
dynamically including R-code into R-code
Hello, I have a R-script, R1, that contains some variables and some R-functions. I want to include/require this script into another R-script, R2, so that I can access the the variables and functions that are inside script R1 in script R2. Is this possible? Script R1 could for example contain information about database connections, paths etc. that would be used in several R scripts. I do not