similar to: confusion matrix - better code?

Displaying 20 results from an estimated 10000 matches similar to: "confusion matrix - better code?"

2009 Dec 03
3
Scraping a web page
I would like to be able to submit a list of URLs of various webpages and extract the "content" i.e. not the mark-up of those pages. I can find plenty of examples in the XML library of extracting links from pages but I cannot seem to find a way to extract the text. Any help would be greatly appreciated - I will not know the structure of the URLs I would submit in advance. Any
2010 Dec 29
3
Windows editor suggestions - autosave
I am looking for advice on an editor to use with R (windows) that has an autosave feature. I typically write scripts using the RGui (and tried TinnR yesterday) but I am having continuing problems with BSODs (non R related) and have in the past have had issues with R crashes and would really like a system that does not require me to remember to hit the save button on my script every 10 minutes so
2011 May 19
2
Anyone successfully install Rgraphviz on windows with R 2.13?
I have been trying to get Rgraphviz to work (I know it is from Bioconductor) unsuccessfully. Since I have no experience with Bioconductor I thought I would ask here if anyone has advice. I have installed Graphviz 2.20.3 as is recommended on the Bioconductor site but basically R cannot seem to find the needed dll files. So, even though I have added the appropriate directories to the system path R
2010 Nov 24
3
Custom ticks on x axis when dates are involved
Hi, I have a set of irregular time series and i want to produce a simple plot, with dates on x axis and attribute value of y axis. This is simple enough but my x axis is divided automatically by ticks every 5 years. I would like to have a tick every year at January 1st. I am not sure how i can do that - i end up with something very close to what i want, but it is clunky and not very correct. I
2007 Aug 02
6
- round() strange behaviour
Hi, I am getting some strange results using round - it seems that it depends if the number before the decimal point is odd or even .... For example: > round(1.5)[1] 2> round(2.5)[1] 2 While i would expect that round(2.5) be 3 and not 2. Do you have any explanation for that? I really appreciate your input, Monica
2007 Dec 13
6
spliting strings ...
Hi everyone, I have a vector of strings, each string made up by different number of words. I want to get a new vector which has only the first word of each string in the first vector. I came up with this: str <- c('aaa bbb', 'cc', 'd eee aa', 'mmm o n') str1 <- rep(1, length(str)) for (i in 1:length(str)) { str1[i] <- strsplit(str, "
2009 Aug 19
2
Problem with predict.coxph
We occasionally utilize the coxph function in the survival library to fit multinomial logit models. (The breslow method produces the same likelihood function as the multinomial logit). We then utilize the predict function to create summary results for various combinations of covariates. For example:
2008 Apr 18
2
Correspondence and detrended correspondence analysis
Hi, I hope someone knows the answer to this or has a real good reference about it (I am using Legendre & Legendre, Numerical Ecology, 1998).... My data is a data.frame with locations as rows and vegetation assemblages / species as columns. I've done a PCA, a correspondance analysis (CA) using ca in ca package and a detrended correspondance analysis (DCA) using decorana from vegan package.
2008 May 22
15
Pros and Cons of R
Hi, I am doing a very informal presentation for my office about R capabilities to deal with and analyze spatial data, display data and maps, and connections with GIS. I've used in my presentation info from the CRAN, the spatial Task view, and the more striking graphics examples from http://addictedtor.free.fr/graphiques/thumbs.php and NCEAS
2006 Mar 08
1
Accessing functions in a library
I am trying to write a modified function to plot an rpart object. By using getS3method I can see the plot and text code that I want to modify. Since I don't want to modify the package, I create a new function to plot the rpart object. The problem is that the original function calls many rpart specific functions that are only visible inside the rpart namespace. Therefore, when I call my
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((min(k1)-5),
2011 Jan 17
2
matrix manipulations
Hi, I am having some difficulties with matrix operations. It is a little hard to explain it so please bear with me. I have a very large data set, large enough that it needs to be split in parts in order to deal with. I can work things on these "parts" but the problem lies in adding together these parts for the final answer. So that been said, let's say that i split the data in 2
2008 Jul 23
2
Warning message in if else statement
Hi, I am using an if else statement inside a function ?. If I use that function I have no problems ?. If I use the function with the if else statement inside a second function I get the following waring: Warning message: In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval : the condition has length> 1 and only the first element will be used Using the second
2008 Jun 25
1
LDA on pre-assigned training and testing data sets
Dear r-help I am trying to run LDA on a training data set, and test it on another data set with the same variables. I found examples using crossvalidation, and using training and testing data sets set up with sample, but not when they are preassigned. Here is what I tried # FIRST SET UP A DATAFRAME WITH ALL THE DATA AND CREATE NEW VARIABLES traintest1 <-
2009 Apr 28
1
Problem with Random Forest predict
I am trying to run a partialPlot with Random Forest (as I have done many times before). First I run my forest... Cell is a 6 level factor that is the dependent variable - all other variables are predictors, most of these are factors as well. predCell<-randomForest(x=tempdata[-match("Cell",names(tempdata))],y=tempdata$Cell,importance=T) Then I try my partial plot to look at the
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2009 May 26
3
split strings
Hi everybody, I have a vector of characters and i would like to extract certain parts. My vector is named metr_list: [1] "F:/Naval_Live_Oaks/2005/data//BE.tif" [2] "F:/Naval_Live_Oaks/2005/data//CH.tif" [3] "F:/Naval_Live_Oaks/2005/data//CRR.tif" [4] "F:/Naval_Live_Oaks/2005/data//HOME.tif" And i would like to extract BE, CH, CRR, and HOME in a
2006 Aug 31
4
problems with plot.data.frame
Hi list, I have a question about 'plot'. I am trying to plot values registered every month - or every other month. If i build a data.frame called mydata like this (as an example) jan 3 1 7 mar 2 4 2 may 1 3 2 jul 3 7 4 sep 5 2 3 nov 3 1 5 and use the command line: plot(mydata[c(1,3)]) I get a graph that has on the x axis my months in alphabetical
2008 Mar 13
4
a more elegant way to get percentages?
Hi, I am trying to get percentages in a more elegant way. I have a data.frame with locations and values (counts) of species at that location. Each location is repeated for each species i have values for and i would like to get percentages of each species at that location. I am not sure if i am clear in my explanations so i will paste my code below: ##################### > x locat val 1
2006 Jun 01
1
Help with evaluation of expressions
Hello all: I have searched through the help files and I have been unsuccessful in solving this problem. I am trying to create a small wrapper function that will go around a call to a plot function and create a windows metafile in the directory and also write the name of the file to a text file. The purpose is to efficiently bring a large number of plots into powerpoint. I am using