Displaying 20 results from an estimated 1000 matches similar to: "A question about R environment"
2007 Aug 27
4
Problem with save or/and if (I think but maybe not ...)
Hi,
I recently discovered the R program and I thought it could be useful to me.
I have to analyse data saved as .Px file (x between 0 and 8 - .P0 files have
18 lines at the beginning that I have to skip). New files are generated
everyday.
This is my strategy :
In order to analyse the data, I first want to copy the new data in a
database in MySQL (which already contains the previous data).
So
2014 Sep 21
1
Bug in new behaviour for all.equal and environments?
Hi R-devel,
The following code:
all.equal(baseenv(), baseenv())
gives the error when run in a clean R session with latest R-devel (r66650):
kevin:~$ R --vanilla --slave -e "all.equal(baseenv(), baseenv())"
Error in all.equal.envRefClass(target[[i]], current[[i]],
check.attributes = check.attributes, :
attempt to apply non-function
Calls: all.equal ...
2010 Feb 25
2
proto and baseenv()
I understand why the following happens ($.proto delegates to get,
which ascends the parent hierarchy up to globalenv()), but I still
find it anti-intuitive:
> z <- 1
> y <- proto(a=2)
> y$z
[1] 1
Although this is well-documented behavior; wouldn't it uphold the
principle of least surprise to inherit instead from baseenv() or
emptyenv()? (See attached patch.)
Spurious
2009 Mar 10
1
R-question
Hello,
I’m a french student in Master level “Statistics and Econometrics” . Now I’m in training for a marketing firm.
I don’t find the information about the capacity of R .
Can you tell me how much lignes and colones can R manipulates?
Can I work with a data of 2 milions lignes?
When I asked M.Maechler , he advices me to ask you about this.
Thank you very much.
> Date: Sun, 8
2005 Nov 04
1
Changes to environments in R-devel
I've just committed some changes to R-devel which affect environments.
Specifically:
- using NULL as an environment is now deprecated: use baseenv()
instead. (baseenv() is already available in R 2.2.0, where it returns
NULL. For most purposes it retains the same meaning in R-devel.) If you
do use NULL, it will be converted to baseenv(), and a warning printed.
For example:
> f
2006 May 09
1
"Unfelicity" :-) with edit()
Hi, people. This is about R 2.3.0 under Linux.
It seems that edit() may change a function environment. Here is
a transcript, more comments follow:
======================================================================>
> fix(f)
> f
function ()
{
}
> fix(f)
Erreur dans edit(name, file, title, editor) :
une erreur s'est produite ? la ligne 3
utilisez une commande du
2006 Apr 11
1
eapply() fails on baseenv() (PR#8761)
eapply() works on most environments, but not on baseenv(). For example,
> x <- 1
> eapply(globalenv(), function(x) x)
$x
[1] 1
> eapply(baseenv(), function(x) x)
list()
I'm probably not going to have time to work on this before 2.3.0, but I
don't think it's really urgent; if no one else fixes it first I'll do it
after the release.
Duncan Murdoch
2011 Dec 31
1
Cross-validation error with tune and with rpart
Hello list,
I'm trying to generate classifiers for a certain task using several
methods, one of them being decision trees. The doubts come when I want to
estimate the cross-validation error of the generated tree:
tree <- rpart(y~., data=data.frame(xsel, y), cp=0.00001)
ptree <- prune(tree,
cp=tree$cptable[which.min(tree$cptable[,"xerror"]),"CP"])
ptree$cptable
2006 Apr 04
2
Return function from function with minimal environment
Hi,
this relates to the question "How to set a former environment?" asked
yesterday. What is the best way to to return a function with a
minimal environment from a function? Here is a dummy example:
foo <- function(huge) {
scale <- mean(huge)
function(x) { scale * x }
}
fcn <- foo(1:10e5)
The problem with this approach is that the environment of 'fcn' does
not
2011 Mar 11
1
dataframe to a timeseries object
I?m wondering which is the most efficient (time, than memory usage) way to obtain a multivariate time series object from a data frame (the easiest data structure to get data from a database trough RODBC).
I have a starting point using timeSeries or xts library (these libraries can handle time zones), below you can find code to test.
Merging parallelization (cbind) is something I?m thinking at
2007 Apr 12
9
taille de caractère
en fait je vous renvoi ce message car maintenant la taille de la police change au bout de 500 lignes environ, alors que j''avais reussi à garder la taille jusqu''à environ 5000 lignes.
Je ne comprend pas. Est-ce que c''est instable?
le bout de code que vous m''avez envoyer ne marche pas.
merci
Sebastien
_______________________________________________
wxruby-users
2020 Aug 10
3
lm() takes weights from formula environment
I wish I had started with "I am disappointed that lm() doesn't continue its search for weights into the calling environment" or "the fact that lm() looks only in the formula environment and data frame for weights doesn't seem consistent with how other values are treated."
But I did not. So I do apologize for both that and for negative tone on my part.
Simplified
2006 Sep 27
2
How to pass expression as an argument
Hi,
I am writing a function and need to pass a function expression as an argument, for instance,
myfun <- function( express) {
x<- c(1,2,3)
y<-express
}
if I call the above function by myfun( x*2 ), I get 2 as the result, instead of 2,4,6 , could someone help me to
fix this problem ?
Furthermore, is that
2015 Feb 10
2
Don't wait too much time (for tincd)
Hi!
I'm in China now and my Internet connexion is very bad. I ever use the
best ADSL provider that I can have.
In some case (often), the connexion is lost. At the first time, tincd
will wait few time and retry. But, this delay is increased if the
connexion can't be made... so, it's quicker to kill tincd and restart it.
How it possible to make tincd restart if the connexion
2005 Aug 09
2
connexion problem getHdata (HMisc)
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Hi
Just installing R and some
2018 Mar 06
4
Capturing warning within user-defined function
Hi, I am trying to automate the creation of tables for some simply
analyses. There are lots and lots of tables, thus the creation of a
user-defined function to make and output them to excel.
My problem is that some of the analyses have convergence issues, which I
want captured and included in the output so the folks looking at them know
how to view those estimates.
I am successfully able to do
2020 Jun 30
4
R-devel internal errors during check produce?
>>>>> Kurt Hornik
>>>>> on Tue, 30 Jun 2020 06:20:57 +0200 writes:
>>>>> Jan Gorecki writes:
>> Thank you both, You are absolutely correct that example
>> should be minimal, so here it is.
>> l = list(a=new.env(), b=new.env()) unique(l)
>> Just for completeness, env_list during check that raises
2018 Dec 21
2
Bug report: R.home() cause package Rcpp failed executing sourceCpp, similar bug are labeled "BUG 16660" since 2016 and here I could provide a solution that tested in my laptop.
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16660
Here is the bug, which R.home may generate a path contains a whitespace.
this will cause Rcpp failed executing sourceCpp
> sourceCpp("b:/2018-12-14/src/18020/MCMC.cpp")
Error in system(cmd, intern = !showOutput) : 'D:/Program' not found
Error in system(cmd, ignore.stderr = TRUE, intern = TRUE) :
2005 Aug 26
2
Samba PDC logon without connexion
Hi,
We have a Samba 3.0.14 PDC,
when a client Win XP SP2 open session without LAN connexion the user CAN log
into domain, why ? and how manipulate this features ?
I think that client use their own SAM database, is it right ?
I am sorry for my poor englsih.
Thanks
2007 May 15
1
getNamespaceExports("base") error
Hi!
>getNamespaceExports("base")
Error in ls(NULL, all = TRUE) : using 'as.environment(NULL)' is defunct
getNamespaceExports
function (ns)
{
ns <- asNamespace(ns)
if (isBaseNamespace(ns))
ls(NULL, all = TRUE)
else ls(getNamespaceInfo(ns, "exports"), all = TRUE)
}
<environment: namespace:base>
One possible way to fix this could be