Re: [R] plot legend: combining filled boxes and lines

2007-09-10 Thread Monica Pisica
This is not quite what you want but you can try this: legend(3, 0.45, legend = c(x1, x2, mean(x1), mean(x2)), col = c(orange, green),pch = c(15,15,-1,-1), lty=c(-1,-1,2,2)) Although pch=22 should draw a filled square with a border - but it draws only the border instead Monica

Re: [R] confusion matrix - better code?

2007-09-09 Thread Monica Pisica
, pr) cm pr tr 1 2 3 1 2 1 0 2 2 1 0 3 0 0 3 4 0 1 0 rowSums(cm) colSums(cm) Best wishes Wolfgang Huber Monica Pisica ha scritto: Hi,I�ve written some code to obtain a confusion matrix when the true classification and the predicted classification are known. Suppose true

Re: [R] confusion matrix - better code?

2007-09-08 Thread Monica Pisica
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Monica Pisica Sent: Friday, September 07, 2007 2:53 PM To: r-help@stat.math.ethz.ch Subject: [R] confusion matrix - better code? Importance: High Hi, I've written some code to obtain a confusion matrix when the true

Re: [R] computing distance in miles or km between 2 street

2007-09-07 Thread Monica Pisica
Phil, If you have only a list of addresses and nothing else - i have to recognize i am lost. But if you have more info you can use a GIS software and it will calculate your distance automatically for all your addresses. To have your distance in miles or Km you need to have a projection in

[R] confusion matrix - better code?

2007-09-07 Thread Monica Pisica
Hi, I’ve written some code to obtain a confusion matrix when the true classification and the predicted classification are known. Suppose true classification is called “tr” and predicted classification is “pr”. I have 4 classes in tr, but only 3 classes out of 4 are predicted in “pr”.

[R] write geotiff with projection - RGDAL package

2007-09-06 Thread Monica Pisica
Hi, Doing more search i've discovered package RGDAL that can write a geotiff file with projection. I saved a geotiff file in UTM projection and if i read the file back in R and check the projection seems that everything is OK. But if i load the file in ArcGIS (ESRI product) i get the warning

[R] larger decimal numbers get rounded ....

2007-09-06 Thread Monica Pisica
Hi, I am sure there is a reason but .. why larger decimal numbers get rounded to the nearest integer? Example: a - 3308000.5 a [1] 3308001 I would like my numbers to be decimals since they do represent coordinates and i don't want them rounded how can i keep them as they

[R] For loop with if else statement

2007-09-05 Thread Monica Pisica
Hans, I think your problem is that you don't use the variable which takes different values in your if statement your i changes values and has really nothing to do with your x variable (except the length part ). Also all the other variables need to be declared somehow - otherwise how

[R] geotiff or tiff files with world files

2007-09-05 Thread Monica Pisica
Hi, I have a matrix of data which i can vizualize as an image - for example. I would like to save this image as a geotiff file or at a tiff file with a world file which holds the projection of my data (ultimately the data represent a map of some sort). I know i can save the data as an ESRI

[R] How to signal the end of the table?

2007-08-30 Thread Monica Pisica
Well, i am surprise you have problems to read a table that is small enough to be opened entirely in Excel. I work with csv tables with hundreds of thousands of rows, and sometimes even millions with no problems except that sometimes i have to wait up to 1 or 2 minutes for R to read the

[R] Cleaning up the memory

2007-08-10 Thread Monica Pisica
Hi, I have 4 huge tables on which i want to do a PCA analysis and a kmean clustering. If i run each table individually i have no problems, but if i want to run it in a for loop i exceed the memory alocation after the second table, even if i save the results as a csv table and i clean up all

Re: [R] Cleaning up the memory

2007-08-10 Thread Monica Pisica
: [R] Cleaning up the memory On Fri, 10 Aug 2007, Monica Pisica wrote:Hi, I have 4 huge tables on which i want to do a PCA analysis and a kmean clustering. If i run each table individually i have no problems, but if i want to run it in a for loop i exceed the memory alocation after

[R] problems saving jpg files

2007-08-07 Thread Monica Pisica
Hi, I have a batch routine that does PCA on a series of files and saves the results as a csv file, and the respective graphs as pdf and jpg. While pdf's are fine, jpg files have a light grey background does not matter what color i set the bg param. I am running this on a PC with 4 GB RAM -

[R] - round() strange behaviour

2007-08-02 Thread Monica Pisica
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

Re: [R] - round() strange behaviour

2007-08-02 Thread Monica Pisica
didn't realize that it is normal for R to give a 2 instead of 3. Date: Thu, 2 Aug 2007 22:38:49 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@stat.math.ethz.ch Subject: Re: [R] - round() strange behaviour On Thu, 2 Aug 2007, Monica Pisica wrote:Hi, I am getting some strange

[R] - ICA for less common data

2007-04-30 Thread Monica Pisica
Hi everyone, I am not sure this is the appropriate list I should put this question to, but I hope you will re-direct me to the most appropriate one if necessary. I am doing an independent component analysis on a dataset that represents different metrics for patchreefs such as depth, area,

[R] ICA for less common data

2007-04-17 Thread Monica Pisica
Hi everyone, I am not sure this is the appropriate list I should put this question to, but I hope you will re-direct me to the most appropriate one if necessary. I am doing an independent component analysis on a dataset that represents different metrics for patchreefs such as depth, area,

[R] Kmeans cluster analysis

2007-04-11 Thread Monica Pisica
Hi Nataniel, As far as i know there is a package called clustTool which has a very nice interface with the capability to do different cluster analyses. It also prodused a plot of each cluster and the mean for each cluster of each variable - and i guess this is what you are after! But depending

[R] strange error in robust package

2007-02-05 Thread Monica Pisica
Hi everybody, I am using quite frequently the robust package and until now i never had any problems. Actually last time i used it was last Friday very successfully. Anyway, today anytime i want to use the function fit.models i get the following error even if i use the example form the help

[R] problems with plot.data.frame

2006-08-31 Thread Monica Pisica
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 jul3 7 4 sep 5 2 3 nov 3 1 5 and use the command

Re: [R] problems with plot.data.frame

2006-08-31 Thread Monica Pisica
Hi again, OK i came up with this after i got few good sugegstions. First my data.frame actually looks like that (Thanks for clarifications to Prof. Brian Ripley) V1 V2 V3 V4 1 jan 3 1 7 2 mar 2 4 2 3 may 1 3 2 4 jul 3 7 4 5 sep 5 2 3 6 nov 3 1 5 What i want: 1. On x