similar to: opening files in directory

Displaying 20 results from an estimated 10000 matches similar to: "opening files in directory"

2006 Aug 07
5
kmeans and incom,plete distance matrix concern
Hi there I have been using R to perform kmeans on a dataset. The data is fed in using read.table and then a matrix (x) is created i.e: [ mat <- matrix(0, nlevels(DF$V1), nlevels(DF$V2), dimnames = list(levels(DF$V1), levels(DF$V2))) mat[cbind(DF$V1, DF$V2)] <- DF$V3 This matrix is then taken and a distance matrix (y) created using dist() before performing the kmeans clustering. My query
2006 Aug 05
1
formating for dist function
Hi there I have a list that looks like this object1 object1 78 object1 object2 45 object1 object3 34 object1 object4 45 object2 object2 89 object2 object3 32 object2 object4 13 but i want to create a matrix like this in order to use the dist function of R object1 object2 object3 object4 object1 78 45 34 45 object2 45
2007 Feb 27
11
Mongrel upload progress not showing progress on production server
Hi all, Tried out the mongrel upload progress plugin with Drb and it works great on my OSX development box, but when putting it into production (Ubuntu Dapper), uploads complete but the app isn''t returning any values for upload progress, and uploads are not showing up in the queue when running upload_client.rb. Before anyone asks, yes, I''m running both the mongrel instances and
2007 Jan 21
1
Working with a set of matrices
Hi, I have a set of matrices (MAT.1, MAT.2, ...) and I'd like to perform the same operation on each of them (for simplicity, say . I'm writing a function for this so that it can be repeated for different sets with different numbers of matrices. The matrices have the same number of columns, but do not have the same number of rows. My thought is to loop thru the set. but I'm not sure
2012 Aug 24
3
Euclidean distance function
Hi, I should preface this problem with a statement that although I am sure this is a really easy function to write, I have tried and failed to get my head around writing functions in R. I can use R where functions exist to do what I want done, but have found myself completely incapable of writing them myself. The problem is that I have a table with several rows of species and several columns of
2007 Aug 22
3
rectify a program of seasonal dummies matrix
Hi friends, I would like to construct a matrix of seasonal dummies with number of rows (observations)=100. such matrix is written as follows:[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1;1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1;etc...] . I wrote the following program: T=100 br=matrix(0,T,4) { for (i in 1:T) for (j in 1:4) if i==j br[i,j]=1 if else (abs(i-j)%%4==0 br[i,j]=1 else br[i,j]=0 } z<-br z but
2006 Sep 01
2
repeating the same procedure with a number of files within a directory
Hi there I am very new to R so dont know much about the programming side of thing yet. I've worked out how to input a data matrix, create distance matrices and print them to an external file but only for one data matrix at a time. I actually have a batch of data matrices for which I want to create distance matrices for each in turn and then print these distance matrices to their respective
2005 Mar 28
4
Problem with bindings and MinGW
Message body follows: Hi, I'm interested in Xapian as a possible search engine for a Python project I'm developing. The reason why I write to you, is that I saw that you've been fixing bugs... so please excuse me if I'm bothering you: I saw no other contact on the xapian.org web pages. I've been spending the last two days trying to set up Python bindings for the library
2005 Mar 28
4
Problem with bindings and MinGW
Message body follows: Hi, I'm interested in Xapian as a possible search engine for a Python project I'm developing. The reason why I write to you, is that I saw that you've been fixing bugs... so please excuse me if I'm bothering you: I saw no other contact on the xapian.org web pages. I've been spending the last two days trying to set up Python bindings for the library
2006 Mar 01
2
Weighted networks and multigraphs
I would like to apply network measures (such as betweenness centrality, upper boundedness, etc.) to a weighted graph with non-integer weights, defined by a euclidean distance matrix. The package sna provides the measures that I want to use, but seems only to operate on binary graphs. I have read work by Mark Newman (http://aps.arxiv.org/abs/cond-mat/0407503/), who suggests that a weighted graph
2006 Sep 08
1
Connecting to R using Perl?
Hi there Can anyone tell me please if I can access R though a perl script? And whether there are some internet resources/books I can use to help me? Thanks [[alternative HTML version deleted]]
2008 Jun 27
1
use of quotation marks
Dear R Users. I just discovered today a problem in the use of quotation marks when I'm doing some programs in R. I'm using windows vista environment. The programs that I wrote in the University, made in Windows XP machines run perfectly, but when I run those in my laptop with VISTA, there are many errors. Those errors are due to the type of quotation marks. In the university the quotation
2012 Jun 06
3
Removing Double Quotations After Using Cbind
Hi, I am trying to process genomics data and the presence of both characters and integers in an array is giving issues. The following is an example: > a<-array(c(2,2,"X",1:3,2:4),dim=c(3,3)) > b<-cbind(a[,1],a[,2]) With the output being: [,1] [,2] [1,] "2" "1" [2,] "2" "2" [3,] "X" "3" Is there any
2008 Dec 08
2
I need to run windows program with command line parameters?
In Windows; to have Firefox pass psyn links to the Curse client I use this command: Code: "C:\Program Files\Curse\CurseClient.exe" -url "%1" but when I try to get Linux's Firefox to pass the psyn link to the Curse client running in wine, wine of course assumes that -url and the quotation marks are for it and not the actual Windows command it's meant to run. How do I
2005 Apr 30
3
How to extract function arguments literally
Dear all, One of my friends asked me if it is possible to extract actual R function arguments literally (precisely, as strings). The reason is simple. He feels sometimes awkward to attach quotation marks :-). What he actually wants is to pass R command arguments to XLisp subroutines (He has been an enthusiastic XLisp user for a long time and still tends to use R as a wrapper to XLisp). Is it
2013 Nov 17
4
quotation marks and scan
Dear R People: I'm sure that this is a very simple problem, but I have been wresting with it for some time. I have the following file that has the following one line: CRS("+init=epsg:28992") Fair enough. I scan it into R and get the following: > u [1] "CRS(\"+init=epsg:28992\")" > gsub(pattern='\"',replacement='"',x=u) [1]
2017 Sep 19
2
what do you think about write.table(... qmethod = "excel")?
On 19/09/2017 4:10 PM, Ista Zahn wrote: > On Tue, Sep 19, 2017 at 1:04 PM, Paul Johnson <pauljohn32 at gmail.com> wrote: >> Last week one of our clients reported trouble with a csv file I >> generated with write.table. He said that columns with quotes for >> character variables were rejected by their data importer, which was >> revised to match the way Microsoft
2012 Aug 06
2
Straight-quotes for usage and examples sections in PDF docs?
Is there any way to ensure that quotation marks are left as straight quotes and not converted to curly quotes in the \usage and \examples sections when the pdf versions of the docs are created?
2001 Apr 10
5
Similarity matrix
I frequently use hclust on a similarity matrix. In R only a distance matrix is allowed. Is there a simple reliable transformation of a similarity matrix that will result in a distance matrix making hclust work the same as S-Plus with a similarity matrix? Venables & Ripley 3rd edition implies that a simple reversal of values will suffice. Thanks -Frank -- Frank E Harrell Jr
2008 Feb 22
3
Simultaneously summarizing many models
Dear R users, Let?s say I have 10 models, each named m1,m2,m3..., and I would like to summarize them automatically and simultaneously - e.g., to extract parameter estimates later on from all models; how can I do that? I have tried: x=1:10 #this creates some example data y=rnorm(10) m1=lm(x~y) m2=lm(x~1) sum.lms=function(x)summary(paste("m",x,sep="")) sum.lms(1:2) but