similar to: Distance between a vector and matrix rows

Displaying 20 results from an estimated 700 matches similar to: "Distance between a vector and matrix rows"

2006 Nov 30
3
newbie: new_data_frame <- selected set of rows
Hello, this is probably trivial but I failed to find this particular snippet of code. What I got: my_dataframe (contains say a 40k rows and 4 columns) distances (vector with euclidean distances between a query vector and each of the rows of my_dataframe) What I do: after scaling data my_dataframe I calculate distances. order them then extract top five hits my_dataframe <-
2008 Jan 25
1
How to execute R code
Hi, I have 'R' code in file. saved it as exmaple.r here is the code....... library("hopach") GSE <- read.table("gene_expression_data",sep="\t",header=TRUE,row.names=TRUE) gene.dist <- distancematrix(t(GSE),d="euclid") gene.hobj <- hopach(t(GSE), dmat=gene.dist, mss="med") labelstosil(gene.hobj$cluster$label,gene.dist) I dont
2006 Nov 30
0
new_data_frame <- selected set of rows
Hello, this is probably trivial but I failed to find this particular snippet of code. What I got: my_dataframe (contains say a 40k rows and 4 columns) distances (vector with euclidean distances between a query vector and each of the rows of my_dataframe) What I do: after scaling data my_dataframe I calculate distances. order them then extract top five hits my_dataframe <-
2008 Jan 25
3
Help
Hi, I got command to execute R code from Mark. but it was showing error.. Error in library(hopach) : there is no package called 'hopach' Does it mean this library hopach is not installed. But I have installed complete Bioconductor package. I am confused. can you help me in this thanks Regards, -- Prateek Singh Final year Bioinformatics(BTech) Vellore Institute Of Technology
2008 Aug 29
5
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
On Aug 21, 2008, at 1:37 AM, Wojciech Matyjewicz wrote: > I am investigating what changes are necessary to add support for > first-class structs and arrays and will prepare a version to check > in as > a LLVM project if there still is interest. We want to model this as an analysis and make following changes. - Rename LoopMemDepAnalysis as DataDependenceAnalysis. Various
2007 Jul 23
2
persp and greek symbols in the axes labels
Hello, I am plotting a 3D function using persp and I would like to use greek symbols in the axes labels. I have found examples like this one on the web: plot(0,0,xlab=expression(kappa[lambda]),ylab=substitute(paste(phi,"=",true,sigma),list(true=5))) this works well with plot but not with persp: with the command persp(M,theta = -20,phi =
2011 Nov 17
7
Spatial Statistics using R
I am looking for online courses to learn Spatial Statistics using R. Statistics.com is offering an online course in December on the same topic but that schedule doesn't suit mine. Are there any other similar modes for learning spatial statistics using R??? Can someone please advice??? Thank you. Ravi -- View this message in context:
2011 May 20
8
Building Custom GUIs for R
I am looking to build simple GUIs based on the R codes I have. The main objective is to hide the scary R codes from non-programming people and make it easier for them to try out different inputs. For example, 1. The GUI will have means to upload a csv file which will be read by the R code. 2. A button to preprocess data (carried out by a R function behind) 3. A button to build some models
2011 Nov 10
2
Removing numbers from a list
I am using gsub to remove numbers for each element of a list. Code is given below. testList <- list("this contains a number 1000","this does not contain") removeNumbers <- function(X) { gsub("\\d","",X) } outputList <- lapply(testList,removeNumbers) However, when I try to find the number of words in outputList as follows
2012 Jul 20
3
Crosstab with Average and Count
I have the following data: x <- as.factor(c(1,1,1,2,2,2,3,3,3)) y <- as.factor(c(10,10,10,20,20,20,30,30,30)) z <- c(100,100,NA,200,200,200,300,300,300) I could create the cross tab of x and y with Sum of z as its elements using the xtabs function as follows: # X Vs. Y with Sum Z xtabs(z ~ x + y) y x 10 20 30 1 200 0 0 2 0 600 0 3 0 0 900 How do I replace
2012 Jul 09
4
Skipping lines and incomplete rows
I have a text file that has semi-colon separated values. The table is nearly 10,000 by 585. The files looks as follows: ******************************************* First line: Skip this line Second line: skip this line Third line: skip this line variable1 Variable2 Variable3 Variable4 Unit1 Unit2 Unit3 10 0.1 0.01 0.001 20
2011 May 31
2
Text Summarization
Is there a text mining/ NLP package in R that could do text summarization? For example, take a huge text as input and provide a summary of the text. In package tm, summarization is defined more as high frequency terms which is not what I want. I actually want a summary of what is present in the huge volume of text. Any help on a R package would be helpful. Thank you. Ravi -- View this message
2011 May 04
3
Error in .Fortran Call
I have the following FORTRAN code converted to a DLL: ! my_xmean.f90 ! ! FUNCTIONS/SUBROUTINES exported from my_function.dll: ! my_function - subroutine ! subroutine my_xmean(X,N,XMEAN) ! Expose subroutine my_function to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'my_xmean_'::my_xmean ! Body of my_function DOUBLE PRECISION X(N) XMEAN=0D0 DO J=1,N
2011 May 24
1
Fortran DLL in Spotfire
I have a R code that loads a FORTRAN DLL to do some calculations. The code works fine when I use it in R. But when I try it in spotfire it throws an error that the it is unable to load the shared library and the specified DLL cannot be found. I have used "setwd" to point to the location in the spotfire statistical services server library. Is this the correct way to call the DLL in
2011 Dec 06
1
HTML Forms to R
I have currently a R function that reads a csv file, does some computations, produces some plots and writes a csv file as output. I would like to use HTML forms to make a user interface for calling appropriate parts of the functions (reading csv file, doing computations, displaying plots and writing csv files). Are there are tutorials available that would help me get started?? Thank you. Ravi
2012 May 21
1
htmlParse Error
I am trying to parse a webpage using the htmlParse command in XML package as follows: library(XML) u = "http://en.wikipedia.org/wiki/World_population" doc = htmlParse(u) I get the following error: Error in htmlParse(u) : error in creating parser for http://en.wikipedia.org/wiki/World_population I am using a R 2.13.1 (32 bit version) on a 64 bit Windows. (I tried installing it in
2011 Apr 12
2
Optimzing a nested function
I am trying to optimize a nested function using nlminb. This throws out an error that y is missing. Can someone help me with the correct syntax?? Thank you. test1 <- function(x,y) { sum <- x + y return(sum) } test2 <- function(x,y) { sum <- test1(x,y) sumSq <- sum*sum return(sumSq) } nlminb(start = c(1,1), test2,lower = c(0,0), upper = c(5,5)) -- View this message in
2013 Apr 11
2
Creating a GUI based workflow
Hello R-users, I am interested to know if there is a tool that allows us to build SAS Enterprise Miner like workflows using the R scripts. For example, let's say I have the R scripts/functions for the following tasks: 1. Data Cleaning 2. Model Building 3. Model Validation 4. Visualization I would like to drag these functions into a workflow and run them together (output of one function
2011 May 09
5
Fortran Symbol Name not in Load Table
I am trying to call a FORTRAN subroutine from R. is.loaded is turning out to be TRUE. However when I run my .Fortran command I get the following error: Error in .Fortran("VALUEAHROPTIMIZE", as.double(ahrArray), as.double(kwArray), : Fortran symbol name "valueahroptimize" not in load table I have given the FORTRAN declaration below: subroutine VALUEAHROPTIMIZE(AHR,
2005 Nov 05
2
problem with the assignment function
Hello, I run into the most weird problem I have ever met. I wrote a function "rhopair", which calls a .C function. I cannot assign its value to a variable using either "=" nor "<-". After I did the assignment, "rhopair" cannot reproduce the same result as before with the same argument. Here is the code and results: >