search for: tree1

Displaying 20 results from an estimated 27 matches for "tree1".

Did you mean: tree
2012 Mar 13
1
Error " subscript out of bounds"
...h record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows record with format like this (treeID, MEASUREMENT, VIGOR). My code like this:   treeMeas<-matrix(data=0,nrow=(length(tree1$indivTree)*5), ncol=3) colnames(treeMeas)<-c("indivTree", "meas", "vigor") for(i in 1:length(tree1$indivTree)) {   treeMeas[(i-1)*5+1:(i*5),1]<-tree1$indivTree[i]   treeMeas[(i-1)*5+1:(i*5),2]<-c(0:4)   treeMeas[(i-1)*5+1:(i*5),3]<-c(tree1$VIG0[i], tree1$V...
2009 Nov 25
2
Unique observations
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091125/62ecd9aa/attachment-0001.pl>
2011 Jul 06
1
question about getting things out of an lapply
Dear R-help subscribers, I have a quite stupid question about using lapply. I have the following function: create.gradient <- function(i){ colorgrad01<-color.scale(seq(0,1,by=0.01), extremes=c("red","blue")) tree1$edge[i,1] -> x tree1$edge[i,2] -> y print(x) print(y) all2[x] -> z all2[y] -> z2 round(z, digits = 2) -> z round(z2, digits = 2) -> z2 z*100 -> z z2*100 -> z2 print(z) print(z2) colorgrad<-colorgrad01[z:z2] colorgrad } Basically, I want to pick a partial gradient out of...
2004 Jul 19
2
problem with read.table
...nnement diffu re??u 0.0 crop9 1998/300a 2.0 0.0 0.0 10.333394 0\nRayonnement diffu re??u 0.0 crop9 1998/350a 2.0 0.0 0.0 4.198115 0\n weighting id date x y z calculated observed 1 0 tree1 1998/365a 1.5 1.5 0.00 1.580000e+02 162.000 2 0 tree1 0/0a 1.5 1.5 0.00 6.242254e-03 0.007 3 0 tree1 1998/365a 1.5 1.5 0.00 1.038187e-02 0.011 4 0 tree1 1998/365a 1.5 1.5 0.00 1.008111e+00 0.000 5 0 cell4/voxel23 1998/365a 0.0 1...
2005 Aug 14
1
How to add decision trees into a list?
...test table table(predict(fit, iris[-sub,], type="class"), iris[-sub, "Species"]) # add fit to the collection collection <- fit # for the illustrative purpose, I add fit again to the # collection collection <- c(collection, fit) # get the first tree in the collection??? tree1 <- collection[1] # test the tree table(predict(tree1, iris[-sub,], type="class"), iris[-sub, "Species"]) # error message from R Error in predict(tree1, iris[-sub, ], type = "class") : no applicable method for "predict" The problem is that I am not able...
2012 Apr 13
1
Coding columns for survival analysis
...the columns such that the cell reads "found" when a live tree is first observed, "alive" for when a tree is found alive and is not just found, and "mort" when it was previously alive but is now dead. Given the following: > tree_live = data.frame(tree = c("tree1","tree2","tree3","tree4","tree5"), live1 = c(0,0,0,1,1), live2 = c(0,0,1,1,0), live3 = c(0,1,1,0,0), live4 = c(1,1,0,0,0), live5 = c(1, 0, 0, 0, 0)) tree live1 live2 live3 live4 live5 1 tree1 0 0 0 1 1 2 tree2 0...
2009 Mar 11
2
Couple of Questions about Classification trees
...t() but I have a feeling that it's for Splus rather than R as gmistext() doesn.t work for me either. Second question is when I try using the predict.tree to put the test data into the tree and then plot it it comes up with a really weird and wrong looking plot. Here is the code I'm using: tree1 <- tree(row~.,data=train) pruned.tree <- prune.tree(tree1, best = 5, method = "misclass") predict.tree1 <- predict.tree(prune.tree, data = main) plot(predict.tree);text(predict.tree) I sort of don't get a classification tree, I get the x axis labelled 1, the y axis labelled 2...
2017 Nov 03
2
[PATCH] diff: avoid potential null pointer dereference on error
...ree_tree() invocations. --- diff/diff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/diff/diff.c b/diff/diff.c index 5851a1c9c..1f1ab6933 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -389,8 +389,10 @@ main (int argc, char *argv[]) errors++; } - free_tree (tree1); - free_tree (tree2); + if (tree1) + free_tree (tree1); + if (tree2) + free_tree (tree2); free_drives (drvs); free_drives (drvs2); -- 2.13.6
2008 Jan 24
0
Memory problem
...ll, There is something I don't quite understand about R memory management. I have the following function function (AdGroupId) { print(memory.size()) channel <- odbcConnect("RDsn", uid = "xxxx", case = "tolower", pwd = "xxxxxx") Tree1 <- sqlQuery(channel, "exec SelectAdgroups 111120,0", as.is = c(FALSE, FALSE, FALSE, FALSE, TRUE)) Tree2 <- sqlQuery(channel, "exec SelectAdgroups 200337,0", as.is = c(FALSE, FALSE, FALSE, FALSE, TRUE)) gc() print(memory.size()) odbcClose(channel) rm(channel)...
2006 Jan 17
0
Cannot convert from phylo to hclust , error!!???
...o object into a hclust object and then into a dendogram ?? Thanks for any help library(ade4) library(cluster) library(stats) library(ape) data<-read.table(file="in.matrix",header=FALSE,sep="\t",row.names=1) dis<-dist.binary(data,method=5,diag=TRUE) clust<-hclust(dis) tree1<-as.phylo(clust) tree2<-as.phylo(clust) tree3<-as.phylo(clust) tree4<-as.phylo(clust) tree5<-as.phylo(clust) liste <-list(tree1,tree2,tree3,tree4,tree5) cons<-consensus(liste,p=0.5) cons_clust <-as.hclust(cons) Error in "[<-"(`*tmp*`, i, value = numeric(0)) :...
2004 Aug 21
3
sweave and post "rpart"
...ost output from a rpart-object in a large sweave file or is only the less nicely plot function instead of post possible??? \begin{figure}[htbp] \begin{center} <<fig=true,eps=T>>= post(dtreeEB, title="Tree",digits=getOption("digits") - 0,use.n=TRUE) @ \caption{Tree1} \end{center} \end{figure} (1) if the rpart object result contain only the root node, i get this error: Error: chunk 21 Error in if (is.leaf[lson]) left <- list(left = x[lson], right = x[lson], : missing value where TRUE/FALSE needed (2) if the rpart object contains further nodes sweav...
2013 Jul 12
0
SH test results
Hi all, I am a phylogenetic student, I'm running SH test to examine free (tree1) and constrained (tree2) trees using R phangorn package. The outputs are like the following and i'm confused how should i interpret them!!!   Trees      ln L           Diff ln L    p-value [1,]     1 -1422.921   0.00000  0.4952 [2,]     2 -1457.282  34.36085  0.0201 Why it gives us two p value...
2006 May 09
1
problem accessing trees after read.nexus from ape package
Hello, I've been trying to figure out how to access the individual elements from an object of class phylo. I am reading in 201 trees created by paup as below. > read.nexus("A_30knj_200t.txt", tree.names= NULL) -> anj30 > anj30[1] $tree1 $edge [,1] [,2] [1,] "-1" "-2" [2,] "-2" "-3" [3,] "-3" "1" [4,] "-3" "2" [5,] "-2" "-4" [6,] "-4" "3" [7,] "-4" "4" [8,] "-1"...
2016 Oct 10
0
aVirtualTwins available on CRAN
...Subgroup size Treatement event rate Control event rate Treatment sample size Control sample size RR (resub) RR (snd) ------ ---------------------------- -------------- ---------------------- ------------------- ---------------------- -------------------- ----------- --------- tree1 PRAPACHE>=26.5 157 0.752 0.327 105 52 2.300 1.774 tree3 PRAPACHE>=26.5 & AGE>=51.74 120 0.897 0.31 78 4...
2016 Oct 10
0
aVirtualTwins available on CRAN
...Subgroup size Treatement event rate Control event rate Treatment sample size Control sample size RR (resub) RR (snd) ------ ---------------------------- -------------- ---------------------- ------------------- ---------------------- -------------------- ----------- --------- tree1 PRAPACHE>=26.5 157 0.752 0.327 105 52 2.300 1.774 tree3 PRAPACHE>=26.5 & AGE>=51.74 120 0.897 0.31 78 4...
2003 Feb 12
3
duplicated file removal: call for comment
This is a call for comments, regarding what you do expect when copying multible source tree roots leading to the same directory root, using rsync. This problem may be discussed now, because in versions before rsync-2.5.6, the algorithm for removing the so called "duplicated files" was broken. That's why we expect nobody used it anyway in earlier versions - but who knows.. Example:
2003 Jan 14
4
specifying a list of files to transfer
...s is just a test example). There were 5059 entries in /tmp/changed. I used my new options to sync up these files to another host as follows: time rsync -RlHptgoD --numeric-ids --source-list \ --send-dirs --no-implicit-dirs -xz --stats /dev/stdin \ remotehost:/extra_disk/tmp/tree1 < /tmp/changed Here were the reported statistics: Number of files: 5059 Number of files transferred: 5056 Total file size: 355514100 bytes Total transferred file size: 355514100 bytes Literal data: 355514100 bytes Matched data: 0 bytes Fi...
2020 Feb 13
0
[PATCH v3 1/1] tools: add '--blocksize' option for C-based tools
...{ "csv", 0, 0, 0 }, @@ -201,6 +204,8 @@ main (int argc, char *argv[]) struct drv *drvs2 = NULL; /* Second guest. */ const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; struct tree *tree1, *tree2; @@ -232,6 +237,8 @@ main (int argc, char *argv[]) echo_keys = 1; } else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION_blocksize;...
2020 Feb 12
0
[PATCH v2 1/1] tools: add '--blocksize' option for C-based tools
...long-options", 0, 0, 0 }, @@ -201,6 +204,8 @@ main (int argc, char *argv[]) struct drv *drvs2 = NULL; /* Second guest. */ const char *format = NULL; bool format_consumed = true; + int blocksize = 0; + bool blocksize_consumed = true; int c; int option_index; struct tree *tree1, *tree2; @@ -232,6 +237,8 @@ main (int argc, char *argv[]) echo_keys = 1; } else if (STREQ (long_options[option_index].name, "format")) { OPTION_format; + } else if (STREQ (long_options[option_index].name, "blocksize")) { + OPTION_blocksize;...
2020 Feb 13
2
[PATCH v3 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com> This patch depends on changes in 'common' sub-module posted here: https://www.redhat.com/archives/libguestfs/2020-February/msg00150.html v3 fixes issue found during code review: - options now appear in alphabetical order v2: Almost the same as v1 except '--blocksize' option description is moved into a common submodule (similar to