similar to: how to extract options for a function call

Displaying 20 results from an estimated 800 matches similar to: "how to extract options for a function call"

2007 Sep 02
1
buglet in dist() ?
the first line of dist() says if (!is.na(pmatch(method, "euclidian"))) shouldn't that be "euclidean" ? --------------------- R version 2.5.1 (2007-06-27) i486-pc-linux-gnu locale:
2006 Apr 03
2
about arguments in "bclust"
Hi All, Just want to make sure, in function "bclust", do the following argument only have one option? argument "dist.method" has one option "Euclidian"; argument "hclust.method" has one option "average"; argument "base.method" has one option "kmeans". Thank you! [[alternative HTML version deleted]]
2009 Jul 16
2
Count the number of occurences in ranges
I got a vector of probabilities like, probs<-c(0.001,0.5,0.02,1,.....) Is there any nice and easy builtin function to get the number of occurences within some specified probabality range. Like with 2% it would be occur[1] = sum(probs[probs>0&probs<0.02]) occur[2] = sum(probs[probs>0.02&probs<0.04]) ... occur[50] =sum(probs[probs>0.09] & probs<1) (If it was a
2009 Jul 17
1
get a vector with filenames with a certain extension in a folder
Hi I got a script that works on file with the extension ".qed" that are al located in a folder '~/works/' Is there are R function that will fetch all the filenames from the works subdir, similar to 'ls ~/works/*.qed' Thanks in advance
2010 Jul 20
1
p-values pvclust maximum distance measure
Hi, I am new to clustering and was wondering why pvclust using "maximum" as distance measure nearly always results in p-values above 95%. I wrote an example programme which demonstrates this effect. I uploaded a PDF showing the results Here is the code which produces the PDF file: ------------------------------------------------------------------------------------- s <-
2008 Jun 26
1
Question about Constraint Optimization
Dear All, I am having trouble in using R function "constrOptim" to do constraint optimization. It seems that "constrOptim" calls function "optim" when it does the optimization, and "optim" allows us to set "method" to be "SANN" if we want to use simulated annealing. In "optim", the function allows us to set gradient to be
2009 Oct 20
1
Buglet in optim() SANN
I think SANN method in optim() is failing to report that it has not converged. Here is an example genrose.f<- function(x, gs=NULL){ # objective function ## One generalization of the Rosenbrock banana valley function (n parameters) n <- length(x) if(is.null(gs)) { gs=100.0 } fval<-1.0 + sum (gs*(x[1:(n-1)]^2 - x[2:n])^2 + (x[2:n] - 1)^2) return(fval) }
2016 May 05
2
GSoC 2016 - Introduction
Hello, Thanks James for the reply. That cleared a few things out. Apologies for replying late because of exams going on. I was going through the previous clustering API to understand how it worked and it seems like the the approach for construction of the termlists which are used for distance metrics use TF-IDF weighting with cosine similarity, which is very similar to the approach I would need
2008 Jan 18
1
constrOptim with method SANN
Hi Everyone, I'm trying to minimize a function using constrOptim with the simulated annealing method SANN. If I understand constrOptim well, it basically passes most of its arguments to optim while somehow enforcing the constraints. My problem is, that since SANN does not need gradients, when using optim with SANN, the gr argument of optim is used to specify a function to create the next
2001 Dec 13
2
k-means with euclidian distance but no coordinates
Hi, I'm trying to build a thesaurus that will sensible values for rare words. I suspect the best algorithm to use is k-means although I'm not sure about that -- I would have preferred a k dimensional space with a binary cluster in each dimension so a word can belong to 0..k clusters, but I digress... I can measure the strength of correlation between words fairly easily by counting
2004 Sep 12
2
mahalanobis distance
Is there a function that calculate the mahalanobis distance in R . The dist function calculates "euclidean"', '"maximum"', '"manhattan"', '"canberra"', '"binary"' or '"minkowski"'. Thanks ../Murli
2011 Dec 16
1
optim with simulated annealing SANN for combinatorial optimization
Hi all I am trying to solve a combinatorial optimization problem. Basically, I can reduce my problem into the next problem: 1.- Given a NxN grid of points, with some values in each cell 2.- Find the combination of K points on the grid such that, the maximum mean value is obtained I took the Travel SalesMan problem example in ?optim documentation. I am not sure if I have understood correctly
2003 Jul 16
2
numerical differentiation in R? (for optim "SANN" parscale)
Dear R users, I am running a maximum likelihood model with optim. I chose the simulated annealing method (method="SANN"). SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter. The help sais: `parscale' A vector of scaling values for the parameters. Optimization is performed on `par/parscale' and these
2006 Mar 08
1
function gdist, dist and vegdist in mvpart
Dear R community, I am analyzing plant communities with the function mvpart, using a dissimilarit matrix as input. The matrix is calculated with the funtion gdist. fit <- mvpart(gdist (ba12[,18:29], meth="maximum", full=TRUE, sq=F) ~ beers + slope_dem + elev_dem+ plc_dem + pr_curv+ +curv+max_depth+doc_rocks+ abandon+land_use+ca_old, data=ba12, xv="p") This
2004 May 28
1
optim(method="SANN")
Hello List I'm working on a combinatoric problem in which the object is to minimize the badness() of a vector. I think this class of problem is only soluble by optim() using method=SANN. The badness() of anything is >= 0, and when I've found a solution with zero badness, I want optim() to stop (carrying on beyond zero badness cannot improve the solution). Efficiency is crucial here.
2002 Aug 13
1
Rcmd SHLIB under NT
Hello: I'm trying to use Rcmd SHLIB to compile a single file, sann.c, to get sann.dll. I was able to get make libR.a to work, after going into MkRules and changing the line DLLTOOL=$(BINPREF)dlltool -k --as $(AS) to read DLLTOOL=C:/MINGW-1.1/bin/dlltool -k --as $(AS) But now I get: C:\rw1051\src\gnuwin32>Rcmd SHLIB sann.c make: make: Command not found make: *** [libR] Error 127
2006 May 16
1
Bay Cities Ruby Group
Hello, I''m trying to organize a Bay Cities Ruby Group in Southern California. This would include the cities of Redondo Beach, Manhatten Beach, Hermosa Beach, Torrance, Gardena, Lomita, etc. If you are interesting in joining a group that would be like other ruby groups where we discuss tricks, technique, theory, etc. and help each other, then please join the mailing list:
2007 Feb 15
3
Re: Incremental Updates
As an alternative to polling the client, as Ryan describes, you could consider piggy-backing the status updates on the back of other ajax responses. Which way you go depends entirely on the nature of your app, in particular: 1. how frequently it generates ajax traffic anyway 2. how long the server-side process is going to take If the server-side process takes, say, 20 seconds, polling is a
2016 Jul 27
2
K MEANS clustering
Hey Parth, Thanks for the reply. I am considering implementing a cosine distance metric too, along with euclidian distance because of the dimensionality issue that comes in with K-Means and euclidian distance metric. That does help when we deal with sparse vectors for documents. The particular problem I'm having is representing centroids in an efficient way. For example, when we find the mean
2005 Sep 12
4
Document clustering for R
I'm working on a project related to document clustering. I know that R has clustering algorithms such as clara, but only supports two distance metrics: euclidian and manhattan, which are not very useful for clustering documents. I was wondering how easy it would be to extend the clustering package in R to support other distance metrics, such as cosine distance, or if there was an API for