similar to: Testing for existence of object within a function

Displaying 20 results from an estimated 11000 matches similar to: "Testing for existence of object within a function"

2007 May 24
4
Function to Sort and test AIC for mixed model lme?
Hi List I'm running a series of mixed models using lme, and I wonder if there is a way to sort them by AIC prior to testing using anova (lme1,lme2,lme3,....lme7) other than by hand. My current output looks like this. anova (lme.T97NULL.ml,lme.T97FULL.ml,lme.T97NOINT.ml,lme.T972way.ml,lme.T97fc. ml, lme.T97ns.ml, lme.T97min.ml) Model df AIC BIC logLik
1997 Aug 04
3
R-alpha: .Options$digits do not (always) work.
I am sorry that this IS an old topic. Yet another task I think the bug is somewhere in hidden in src/main/options.c .. ##-- The following does not work as it should in R (0.50-a1, but I think also earlier) tst <- function(x=pi, dig =3) {.Options$digits <- as.integer(dig); print(x);x} tst() tst(dig = 12) ##-- This should do the same; it works as expected in R & S : tst2
2008 Oct 15
4
strsplit and regex
Hi All, Is there a means to extract the "10" from "23:10:34" in one pass using strsplit (or something else)? tst <- "23:10:34" For example my attempt strsplit(as.character(tst),"^[0-9]*:") gives [[1]] [1] "" "" "34" Obviously it is matching the first two instances of [0-9]. Note that there may be only one digit
2009 Aug 03
3
Help with reshaping data.frame
I'm having trouble reshaping a data.frame from long to wide. (I think that's the right terminology; feel free to educate me.) I've looked at the reshape function and package and plyr package, but I can't quite figure out how to do this after a dozen variations. I have a data.frame with more levels than this, but similar to: > tst K1 K2 K3 V1 V2 V3 1 10 D a 0.08 99
2010 Aug 28
9
How to define new matrix based on an elementary row operation in a single step?
-- View this message in context: http://r.789695.n4.nabble.com/How-to-define-new-matrix-based-on-an-elementary-row-operation-in-a-single-step-tp2341768p2341768.html Sent from the R help mailing list archive at Nabble.com.
2008 May 02
1
Speedups with Ra and jit
The topic of Ra and jit has come up on this list recently (see http://www.milbo.users.sonic.net/ra/index.html) so I thought people might be interested in this little demo. For it I used my machine, a 3-year old laptop with 2Gb memory running Windows XP, and the good old convolution example, the same one as used on the web page, (though the code on the web page has a slight glitch in it). This
2015 Oct 13
1
Dovecot - Postfix with HAproxy
Hi Everyone, I wouldlike to set up a postfix-dovecot with HA using HAproxy but im facing issues. I've followed this documentation : http://wiki2.dovecot.org/HAProxy (pour dovecot) http://blog.haproxy.com/2012/06/30/efficient-smtp-relay-infrastructure-with-postfix-and-load-balancers/ (pour postfix) Package's version : dovecot : 2:2.2.19 (>= 2.2.19 pour proxy protocol)
1997 Aug 25
0
R-alpha: Re: .Options$digits do not (always) work
While trying to understand official and private explanations of Robert and Martin before writing something useful in the FAQ, I did some more experimenting ... Please have a look at the following. According to Martin, this is also what he observed about 2 weeks ago but did not document exactly enough when posting. Note: the explanation given by Robert was (roughly speaking) that the result of
1997 Aug 05
3
R-alpha: Version 0.50-a1 patches
A set of patches for R-0.50-a1 is now available as ftp://stat.auckland.ac.nz/pub/R/R-0.50-a1.patch1.gz The patches mainly fix problems reported since R-0.50-a1 but some older problems are also fixed. Here is the list of changes. Ross o Many subsetting and mutation problems with the new "expression" type have now been fixed. o When ask=T is set in par() the user is instructed
2005 Jul 02
2
Is it possible to use glm() with 30 observations?
I have a very simple problem. When using glm to fit binary logistic regression model, sometimes I receive the following warning: Warning messages: 1: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, 2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y, weights = weights, start = start,
2001 Mar 26
1
Problems with R CMD COMPILE within Makefile (PR#885)
Dear R-developpers This concerns a problem I posted about half a year ago on the R-help list and to which I got some answer by Duncan Temple Lang (see below), but the basic problem still continues. Even though I managed a workaround which is sufficient for me Martin Maechler asked me to send a toy example of the problem to R-bugs. So that's what I try here. The following Makefile will not
2004 Oct 19
2
pasting indexes to variables within loops
Hi all, Hope someone can help me. I start out with a matrix called haplo with 600 rows and two columns. To start with, the elements of the matrix are character strings of 20 numbers. I then want to create separate objects, called ha1-ha600, that are the concatenated 20 + 20 numbers, as numeric. I am having no trouble doing anything except getting the index i to paste to the object ha(i) in
2012 Jul 19
3
Maintaining Column names while writing csv file.
Dear R helpers, I have one trivial problem while writing an output file in csv format. I have two dataframes say df1 and df2 which I am reading from two different csv files. df1 has column names as date, r1, r2, r3 while the dataframe df2 has column names as date, 1w, 2w. (the dates in both the date frames are identical also no of elements in each column are equal say = 10). I merge these
2010 Sep 27
2
subtraction based on two groups in a dataframe
Hello I have a data set like below: plate.id well.id Group HYB rlt1 1 P1 A1 Control SKOV3hyb 0.190 2 P1 A2 Control SKOV3hyb 0.210 3 P1 A3 Control SKOV3hyb 0.205 4 P1 A4 Control SKOV3hyb 0.206 5 P1 A5 Control SKOV3hyb 0.184 385 P1 A1 ovca SKOV3hyb 0.184 386 P1 A2 ovca SKOV3hyb 0.229 387
2010 Dec 22
1
matrix indexing in 'for' loop?
Hi, I am having trouble with matrices. I have 2 matrices as given below, and I am interested in using these matrices inside "for" loops used to calculate correlations. I am creating a list with the names of the matrices assuming this list could be indexed inside the 'for' loop to retrieve the matrix values. But, as expected the code throws out an error. Can someone suggest a
2005 Nov 18
1
challenge: using 'subset = <computed>' inside function ..
I've been asked by someone else whom I originally taught `` to just work with substitute() and then all will be fine'' ... But it looks to me that I've been caught here. Is it possible to make this work along the way we thought it should? 1) Inside a function, say tst() with the 'formula' and a 'data' argument, 2) call another modeling function using
2007 Dec 01
1
rsync --delete problems
For some time I have been using rsync to backup data between different machines and my NAS drive. But within the last 2 days I have found out that rsync is not removing old files from destination - directories renamed or removed from source. In this example I want to sync files on my Debian Linux server to a NAS drive. NAS drive is mounted using smbmount. Using "-avhzn" dry-run it
2004 Aug 25
1
brlr function
Hi, I'm trying the brlr function in a penalized logistic regression function. However, I am not sure why I am encountering errors. I hope to seek your advice here. (output below) Thank you! Your help is truly appreciated. Min-Han #No error here, the glm seems to work fine >
2010 Feb 05
1
Strange "rownames"
I find one row in my large dataset. But when I use the "rownames" for the data on the 100,000 row, the result show nothing. I try it by the following example, it still likes that. > tst[rownames(tst)==100000,] [1] x y <0 rows> (or 0-length row.names) ############## > tst=data.frame(x=1:200000,y=200000:1) > tst[rownames(tst)==1,] x y 1 1 200000 >
2009 Apr 04
1
Rails 2.3.2 - template question
Simplest of template files, tst.rb, contains: PROJECT_NAME = File.basename(RAILS_ROOT) run ''echo '' + PROJECT_NAME Running command "rails tst -m ~/Rails_Tools/tst.rb" produces: create create app/controllers . . create log/development.log create log/test.log applying template: /Users/rick/RailsTools/tst.rb Anonymous modules