similar to: Managing a list with a list

Displaying 20 results from an estimated 5000 matches similar to: "Managing a list with a list"

2003 Sep 09
1
tree mortality risk model using glm()
Dear all, I've used glm(family=binomial(link="logit")) several times, but now I think that a log link is more appropriate. I want to fit a model for probability of tree fall (TF)), with tree diameter (dbh) and soil moisure (soil) as predictors. A large number of trees have been checked every second year whether they stand up (0) or have fallen (1). I assume that the tree fall
2009 Oct 22
1
loop vs. apply(): strange behavior with data frame?
Hi everybody, I noticed a strange behavior when using loops versus apply() on a data frame. The example below "explicitly" computes a distance matrix given a dataset. When the dataset is a matrix, everything works fine. But when the dataset is a data.frame, the dist.for function written using nested loops will take a lot longer than the dist.apply ######## USING FOR ####### dist.for
2005 Nov 28
1
terms.object documentation bug? (PR#8353)
Full_Name: simon wood Version: 2.2.0 (and lower) OS: linux/windows Submission from: (NULL) (86.135.153.59) I think that the documentation for the `specials' attribute of a `terms.object' is not quite right: specials: If the 'specials' argument was given to 'terms.formula' there is a 'specials' attribute, a list of vectors indicating the terms
2010 Nov 15
1
Aggregate on identical link attributes
Hello R community, I need to do some aggregation based on the test data below. The below code works ok, but when its applied to my real data which includes over 9,000 records the process runs for over an hour. I know there is a more efficient way of doing this. I want to Sum the below data's volumes where FNODE and TNODE match, i.e. FNODE=1 and TNODE =20 -> Volume=100 ,
2007 Aug 22
3
Help with vector gymnastics
Hello, What is the best way of solving this problem? answer <- ifelse(tf=TRUE, i * 5, previous answer) where as an initial condition tf[1] <- TRUE For example if, tf <- c(T,F,F,F,T,T,F) over i = 1 to 7 then the output of the function will be answer = 5 5 5 5 25 30 30 Thank you. Phil,
2006 Apr 28
2
entries that match a regexp
Hi all, I am trying to filter the element of a df that start with "TF", like this: alfa = c(123221,"TF13124",41243,"TF1234",32414,"TF13124","TF14333",2134123,"TF1234") beta =
2013 Jan 09
1
deparse substitute
Hi, I'm writing a function that needs the input names (as characterstrings) as part of the output. With deparse(substitute( ) ) that works fine, until I replace all zeros with 0.001 (log is calculated at some time): tf <- function(input) { input[input==0] <- 0.001 ; deparse(substitute(input)) } myguess <- 42 tf(myguess) # not "myguess", but "42" Now when
2009 Nov 17
2
Just what is puppet doing here?
What is puppet doing here? Nov 17 00:02:01 gumby yum: Installed: tf-starterkit-tfel0-1.0-1.tf.noarch Nov 17 00:02:01 gumby puppetd[720]: (//Node[gumby.fr.xxx.com]/Starterkit::Setup[tfel0]/Package[tf-starterkit-tfel0]/ensure) created Nov 17 00:02:07 gumby yum: Installed: tf-jboss-server-4.2.3.GA-1.tf.noarch Nov 17 00:02:07 gumby puppetd[720]:
2018 May 01
1
possible internal (un)tar bug
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Tue, 1 May 2018 16:14:43 +0200 writes: >>>>> G?bor Cs?rdi <csardi.gabor at gmail.com> >>>>> on Tue, 1 May 2018 12:05:32 +0000 writes: >> This is a not too old R-devel on Linux, it already fails >> in R 3.4.4, and on macOS as well.
2005 Aug 03
1
abline and linearity over groups
Dear R users, please can you help me understand the behaviour of abline using function lm. I'm trying to learn linearity over groups. So I make three groups with 10 values each: test=data.frame(cbind( l=c(rnorm(10,0,30),rnorm(10,100,30),rnorm(10,200,30)), t = c(rep(0,10), rep(1,10), rep(2,10)) )) when I do: plot(test$l~test$t) abline(lm(test$l~test$t)) the abline is a straight line
2020 Apr 29
2
[Posible SPAM] Re: Stopwords: Topic modelling con LDA
Hola, Acabo de calcular tf-idf y me surge una duda. ¿Habría un valor de idf o tf-idf que se considerara como umbral para establecer que una palabra es muy común o no? Los valores de idf en mis datos van entre 0 y 3.78 y los de tf-idf ente 0 y 0.07. Un saludo El Mar, 28 de Abril de 2020, 12:53, Carlos Ortega escribió: > Hola, > Yo de primeras los quitaría para qué otros topics aparecen.
2015 Feb 22
2
[LLVMdev] Resolving an opaque type in llvm-assembly
According to the Assembly language reference: "In LLVM, opaque types can eventually be resolved to any type (not just a structure type)." But the only way I can think of to do so is to give it a type name, then later redeclare the name. But that gives an error: %TO = type opaque %TF = type i32 ( %TO* ) %TO = type %TF gives: $ llvm-as types1.ll llvm-as: types1.ll:3:1: error:
2009 Jun 23
3
subset POSIXct
Hi, I have a data frame with two columns: dt and tf. The dt column is datetime and the tf column is a temperature. dt tf 1 2009-06-20 00:53:00 73 2 2009-06-20 01:08:00 73 3 2009-06-20 01:44:00 72 4 2009-06-20 01:53:00 71 5 2009-06-20 02:07:00 72 ... I need a subset of the rows where the minutes are 53. The hour is immaterial. I can not find a wildcard
2008 Apr 28
1
[LLVMdev] FoldingSetNodeID operations inefficiency
Hi Chris, Your were totally right with your suggestion. I have implemented the code that : a) does not merge multiple TokenFactor nodes in the DAGCombiner::visitTokenFactor(), if the resulting TF node would contain more than 64 operands. b) produces a bunch of TokenFactor nodes with at most 64 operands, instead of one huge TokenFactor in the SelectionDAGLowering::getRoot(). If we have n
2008 Mar 13
3
fast way to compare two matrices of combinations
I have a list (length 750), each element containing a vector of unique strings (unique gene ids), with length up to ~40 (median 15). I want to compile a matrix of all possible triplets and their frequency within gene elements. Using combn and a lot of looping, I am accomplishing this but it is VERY slow. I've tried to figure out a way to vectorize this, using "match" and
2017 Feb 07
3
[cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64
> I’ve seen the same problem, but didn’t find solution back then. > I can give a hint that it is related to a thread local storage (notice TLS in the name). > > The same result can be reproduced by this simple program: > > thread_local int x = 0; > int main() { > return 0; > } > >When compiled into IR it produces similar error: > >LLVM ERROR:
2011 Sep 01
1
parser does not catch strings without closing quote
Shouldn't the parser complain about unfinished strings in files? It doesn't and will tack on a newline if there isn't one there. > withOption <- function(optionList, expr) { + oldOption <- options(optionList) + on.exit(options(oldOption)) + expr + } > cat(file=tf<-tempfile(), "\"string without closing quote\n") > p <-
2020 Jan 29
2
Model object, when generated in a function, saves entire environment when saved
Reviving an old thread. I haven't noticed this be a problem for a while when saving RDS's which is great. However, I noticed the problem again when saving `qs` files (https://github.com/traversc/qs) which is an RDS replacement with a fast serialization / compression system. I'd like to get an idea of what change was made within R to address this issue for `saveRDS`. My thought is that
2011 Mar 11
1
Easy 'apply' question
Dear list, I couldn't find a solution for this problem online, as simple as it seems. Here's the problem: #Construct test dataframe tf <- data.frame(1:3,4:6,c("A","A","A")) #Try the apply function I'm trying to use test <- apply(tf,2,function(x) if(is.numeric(x)) mean(x) else unique(x)[1]) #Look at the output--all columns treated as character
2012 Jan 11
1
parse( connection) and source-keeping
In R <= 2.13.x, calling 'parse( con)' where 'con' is a connection, 'options( keep.source)' is TRUE, and default 'srcfile' would preserve the source. In R >= 2.14.1, it doesn't. > tf <- tempfile() > options( keep.source=TRUE) > texto <- c( 'function() { # comment', '}') > parse( text=texto) expression(function() { #