[R] Error: could not find function extract in package raster

2010-11-08 Thread Monica Pisica
Hi, I would like to use the function extract from package raster and i get the following error: m01e - extract(marsh01, p) Error: could not find function extract marsh01 is a raster object and p is an intersectExtent object that is not null. The package is installed and loaded, i use a

Re: [R] Error: could not find function extract in package raster

2010-11-08 Thread Monica Pisica
loaded via a namespace (and not attached): [1] grid_2.12.0 lattice_0.19-13 tools_2.12.0 On Mon, Nov 8, 2010 at 8:08 AM, Monica Pisica pisican...@hotmail.com wrote: Hi, I would like to use the function extract from package raster and i get the following error: m01e - extract

[R] Custom ticks on x axis when dates are involved

2010-11-24 Thread Monica Pisica
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

Re: [R] Custom ticks on x axis when dates are involved - many thanks!

2010-11-29 Thread Monica Pisica
...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] Custom ticks on x axis when dates are involved On 11/25/2010 06:27 AM, Monica Pisica wrote: ... Now the graph looks very close to what i want, but i know that my ticks actually are not exactly at 01/01/ as i would like, although i

[R] intersection of 2 density curves

2009-10-08 Thread Monica Pisica
Hi, I would like to find out the coordinates of the intersection points of 2 density curves. I did a search but i didn't get any significant results. I really hope some of you have some ideas. here it is an example: set.seed(123) x1 - rnorm(100, 1, 1) x2 - rnorm(100, 0, 1) d1 - density(x1)

Re: [R] intersection of 2 density curves

2009-10-08 Thread Monica Pisica
as well. =20 Thanks again=2C =20 Monica Date: Thu=2C 8 Oct 2009 16:01:36 +0200 Subject: Re: [R] intersection of 2 density curves From: r.m.k...@gmail.com To: pisican...@hotmail.com CC: r-h...@stat.math.ethz.ch On Thu=2C Oct 8=2C 2009 at 3:48 PM=2C Monica Pisica

Re: [R] intersection of 2 density curves

2009-10-08 Thread Monica Pisica
this is not being done in support of a data-driven discretization of two group comparisons. Such practices are to be eschewed (as they are even worse than obfuscation). -- David Winsemius. On Oct 8=2C 2009=2C at 10:01 AM=2C Rainer M Krug wrote: On Thu=2C Oct 8=2C 2009 at 3:48 PM=2C Monica

Re: [R] Graphics and LaTeX documents with the same font - multiple y-axes

2007-10-01 Thread Monica Pisica
Well, I agree that plots with multiple y-axes can be very confusing but i am not sure that always they are also misleading One time i was asked to make a 2 y-axes plot, one y axes was for elevation (heights in meters) and one for rugosity (values between 1 and 2 - unitless). The

[R] Combining Density plots

2007-11-06 Thread Monica Pisica
Hi, you may want to look at Macdonald P (2006) Mixdist package for R www.math.mcmaster.ca/peter/mix/mix.html It also has an anova test for your model so you would know if your possible sub-populations are statistically significant of not. I don't know why actually this package is not

[R] as.numeric rounds up

2008-02-01 Thread Monica Pisica
Hi list, It seems that as.numeric is rounding up my numbers that are in a character format. Example: a [1] 776554.45 776985.31 776076.03 776092.01 776151.42 776276.97 b - as.numeric(a) b [1] 776554.4 776985.3 776076.0 776092.0 776151.4 776277.0 I've tried as.numeric(a,2) and

Re: [R] as.numeric rounds up - Thanks!

2008-02-01 Thread Monica Pisica
print(b, 10) On 01/02/2008, Monica Pisica [EMAIL PROTECTED] wrote:Hi list, It seems that as.numeric is rounding up my numbers that are in a character format. Example: a [1] 776554.45 776985.31 776076.03 776092.01 776151.42 776276.97b - as.numeric(a) b [1] 776554.4 776985.3

[R] How to search for packages

2008-02-04 Thread Monica Pisica
Hi everybody, I know this might be very off topic and it took me quite a while to up my courage to post this…. But I remember a thread some time ago about how we can find the packages we need to do specific tasks in R if we don’t know before hand which ones actually do it. Now all the

Re: [R] How to search for packages - wrap up!

2008-02-05 Thread Monica Pisica
Hi everybody, I have to recognize that my post certainly shows my lack of skills in really navigating the R web page i am surprised that only one or two persons wrote me about the Task Views - it is what i was after - although maybe too general for my lazy taste - but hei - it is there

Re: [R] newbie (me) needs to model distribution as two overlapping gaussians

2008-02-19 Thread Monica Pisica
take a look at: Du, 2002, Master Thesis, http://www.math.mcmaster.ca/peter/mix/Rmix.pdf Macdonald, P., 2003, RMIX routine for R, http://www.math.mcmaster.ca/peter/mix/mix.html I don't think this package was actually posted on CRAN (the mix package on CRAN is a different one as far as i

[R] How to Read?

2008-03-12 Thread Monica Pisica
Well, i am not sure what do you want how to do the graphs you showed or how to interpret them?? If you want to know how to do them, look at package ade4, especially functions s.corcircle and scatter.dudi, but you can use the function plot as well and choose the right variables since

[R] a more elegant way to get percentages?

2008-03-13 Thread Monica Pisica
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

Re: [R] a more elegant way to get percentages?

2008-03-13 Thread Monica Pisica
= function(x) 100*x/sum(x)) On Thu, Mar 13, 2008 at 9:36 AM, Monica Pisica wrote: 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

[R] dreaded p-val for d^2 of a glm / gam

2008-03-27 Thread Monica Pisica
OK, I really dread to ask that much more that I know some discussion about p-values and if they are relevant for regressions were already on the list. I know to get p-val of regression coefficients - this is not a problem. But unfortunately one editor of a journal where i would like to

Re: [R] dreaded p-val for d^2 of a glm / gam

2008-03-28 Thread Monica Pisica
to this permutation distribution. Hope this helps. Spencer Graves p.s. Regarding your 'dread', please see fortune(children) Monica Pisica wrote: OK, I really dread to ask that much more that I know some discussion about p-values and if they are relevant for regressions were already

[R] unexpected GAM result - at least for me!

2008-03-31 Thread Monica Pisica
Hi I am afraid i am not understanding something very fundamental and does not matter how much i am looking into the book Generalized Additive Models of S. Wood i still don't understand my result. I am trying to model presence / absence (presence = 1, absence = 0) of a species using

Re: [R] unexpected GAM result - at least for me!

2008-03-31 Thread Monica Pisica
to predict presence / absence. Do you think it is still a valid result? Thanks again, Monica Date: Mon, 31 Mar 2008 08:47:48 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] unexpected GAM result - at least for me! On 3/31/2008 8:34 AM, Monica Pisica

Re: [R] unexpected GAM result - at least for me!

2008-04-01 Thread Monica Pisica
, Monica Date: Mon, 31 Mar 2008 09:30:01 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] unexpected GAM result - at least for me! On 3/31/2008 9:01 AM, Monica Pisica wrote: Thanks Duncan. Yes i do have variation in the lidar metrics (be, ch

Re: [R] adding color bar to a graph

2009-08-07 Thread Monica Pisica
...@stat.math.ethz.ch Subject: Re: [R] adding color bar to a graph Monica Pisica wrote: Hi everybody, I am wondering how i can add a stretch color bar / legend to a graph that uses colorBrewer to define the colors in it. I will try to explain my graph, but i also uploaded it at: ftp

[R] memory problem - failing to load rgl in R 2.7.1 patched

2008-08-04 Thread Monica Pisica
Hi, yesterday i had the surprise not to be able to load the package ca on R 2.7.0 saying that cannot find required package rgl although it was there. So today i've upgraded to 7.2.1. patched and i got the following error: local({pkg - select.list(sort(.packages(all.available = TRUE))) +

[R] SOLVED - memory problem - failing to load rgl in R 2.7.1 patched

2008-08-04 Thread Monica Pisica
Hi, Sorry for that . Today R did load both ca and rgl packages with no problems ... the single thing i've done since Friday was to put defrag on drive C, i even didn't re-start the computer ...actually it was re-started several time with same weird problem ... so i suppose something was

[R] : bquote inside legend()

2008-08-11 Thread Monica Pisica
Hi, I have a graph and I would like to write some values inside the legend that were saved in a variable. Please revise the code below in which I've wrote 2 different legends, but I am not happy with either of them. What I want is a legend with tile Legend and underneath a line with a name

Re: [R] : bquote inside legend() - TANKS!

2008-08-11 Thread Monica Pisica
, do.call(expression,list(Legend, val)), bty = 'n') # --- # Code end On Mon, Aug 11, 2008 at 12:30 PM, Monica Pisica wrote: Hi, I have a graph and I would like to write some values inside the legend that were saved in a variable. Please revise the code below in which I've

Re: [R] GAM-binomial logit link

2008-08-21 Thread Monica Pisica
Hi, I am not sure it is the best to use a binomial distribution for a continuous bounded variable. A beta distribution would be more appropriate, although I don't know how to define one for the gam() function. On the other hand beta distribution is closely linked to the gamma distribution so

Re: [R] GAM-binomial logit link

2008-08-25 Thread Monica Pisica
Message: 54Date: Thu, 21 Aug 2008 20:09:08 +From: Monica Pisica [EMAIL PROTECTED]Subject: Re: [R] GAM-binomial logit linkTo: r-help@r-project.orgMessage-ID: [EMAIL PROTECTED]Content-Type: text/plain; charset=iso-8859-1Hi,I am not sure

Re: [R] savePlot() does not save plot with format set

2008-08-26 Thread Monica Pisica
Did you try: savePlot(test.bmp, type = bmp) Monica Message: 118 Date: Tue, 26 Aug 2008 10:29:13 +0100 From: Luis Ridao Cruz Subject: [R] savePlot() does not save plot with format set To: Message-ID: Content-Type:

[R] Non-constant variance and non-Gaussian errors

2008-09-03 Thread Monica Pisica
Hi Paul, Take a look at gam() from package mgcv (gam = generalized additive models), maybe this will help you. GAMs can work with other distributions as well. Generalized additive models consist of a random component, an additive component, and a link function relating these two components.

[R] Adding a legend to R graph device with several plots (no to individual plots!)

2008-09-05 Thread Monica Pisica
Hi Nelson, I don't know if you got your answer or not but here it is my low-tech solution for what is worth. I like to do a layout as I want my graphs to be and add some space where I plot an invisible graph with dummy data and add the legend there. In this case I decided to put the legend on

[R] Join data by minimum distance

2008-09-12 Thread Monica Pisica
I am wondering if there is a function which will do a join between 2 data.frames by minimum distance, as it is done in ArcGIS for example. For people who are not familiar with ArcGIS here it is an explanation: Suppose you have a data.frame with x, y, coordinates called track, and a second

[R] Spatial join – optimizing code

2008-09-16 Thread Monica Pisica
Hi, Few days ago I have asked about spatial join on the minimum distance between 2 sets of points with coordinates and attributes in 2 different data frames. Simon Knapp sent code to do it when calculating distance on a sphere using lat, long coordinates and I've change his code to use

Re: [R] Spatial join - optimizing code

2008-09-16 Thread Monica Pisica
=match[2,], yinfo[match[1,],]) } It's marginally faster to convert xpos to a list followed by sapply as I do here, than to leave it as a matrix and use apply to get the matches. On Tue, Sep 16, 2008 at 04:23:33PM +, Monica Pisica wrote: Hi, Few days ago I have asked about spatial

[R] PCA analysis

2008-06-18 Thread Monica Pisica
Monna, The way i do it is to re-create the biplot for the PCA . I am attaching my code (i am sure this can be done even easier . but this works as well) where i am using pca() function from labdsv and my data is called veg1. library (labdsv) pca.1-pca(veg1,cor=TRUE) # The scores are

Re: [R] loop with files

2008-06-25 Thread Monica Pisica
Hi, I am not sure this is what you want …. But alist - list.files(path = whatever path you have for your files, full.names = TRUE) Now you have a list with the names of your files …. Form each name you can make a variable name and assign that file …. fname - substring(alist[i], first,

Re: [R] tiff()-bug (was re:Preparing high quality figures

2008-06-25 Thread Monica Pisica
Hi, I don't know if this matters but it worked for me with no problems …. sessionInfo() R version 2.7.0 (2008-04-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United

Re: [R] PCA on image data

2008-07-03 Thread Monica Pisica
Hi, You have the values of the principal component in scores (for each location where you have a RGB reading) and the eigenvectors in loadings, see ?princomp So your first pca component would be: comp1 - pca$scores[,1] Now you can transform this in the matrix you need to display your image.

[R] Comparing differences in AUC from 2 different models

2008-07-17 Thread Monica Pisica
Hi, I would like to compare differences in AUC from 2 different models, glm and gam for predicting presence / absence. I know that in theory the model with a higher AUC is better, but what I am interested in is if statistically the increase in AUC from the glm model to the gam model is

[R] saving plot both as jpg and pdf

2008-07-22 Thread Monica Pisica
Hi, I want to save a plot automatically as a pdf and jpg, and if I open the pdf device first and jpeg second only the jpeg file saves correctly …. If I do reverse, only the pdf file saves correctly. pdf('E:/my_graphs/test1.pdf', bg = white) jpeg('E:/my_graphs/test1.jpg', quality = 100, bg =

Re: [R] saving plot both as jpg and pdf

2008-07-22 Thread Monica Pisica
file without opening a pdf device yourself. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Monica Pisica Sent

[R] Warning message in if else statement

2008-07-23 Thread Monica Pisica
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

Re: [R] Warning message in if else statement

2008-07-23 Thread Monica Pisica
internally I get the warning. Any idea why? Thanks, Monica Date: Wed, 23 Jul 2008 12:24:55 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Warning message in if else statement Monica - Monica Pisica wrote: Hi, I am using an if else

Re: [R] Warning message in if else statement

2008-07-23 Thread Monica Pisica
message in if else statement To: [EMAIL PROTECTED] hi monica: i don't understand the statement below. could that be related to your problem ? if (pval==0) p_value - - pval On Wed, Jul 23, 2008 at 2:11 PM, Monica Pisica wrote: Hi Erik, Thanks for your answer. I did print the p-value

[R] failing to load package in R 2.7.1 patched

2008-08-01 Thread Monica Pisica
Hi, yesterday i had the surprise not to be able to load the package ca on R 2.7.0 saying that cannot find required package rgl although it was there. So today i've upgraded to 7.2.1. patched and i got the following error: local({pkg - select.list(sort(.packages(all.available = TRUE))) +

[R] Correspondence and detrended correspondence analysis

2008-04-18 Thread Monica Pisica
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

[R] applying cor.test to a (m, n) matrix

2008-05-08 Thread Monica Pisica
Hi everybody, I would like to apply cor.test to a matrix with m rows and n columns and get the results in a list of matrices , one matrix for p.val, one for the statistic, one for the correlation and 2 for upper and lower confidence intervals, something analog with cor() applied to a matrix.

Re: [R] applying cor.test to a (m, n) matrix - SUMMARY

2008-05-09 Thread Monica Pisica
Hi again, I've got few very good options from the list and since they were not posted to the list, I will provide a summary. Thank you very much to all who answered and I hope this summary will benefit others interested in solving similar problems like that. Yasir Kaheil re-wrote my original

Re: [R] applying cor.test to a (m, n) matrix

2008-05-09 Thread Monica Pisica
/336899Fax: +32/(0)16/337015Web: http://med.kuleuven.be/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm- Original Message - From: Monica Pisica [EMAIL PROTECTED]To: r-help@r-project.orgSent: Thursday, May 08, 2008 9:05 PMSubject: [R] applying cor.test to a (m, n) matrix

[R] Pros and Cons of R

2008-05-22 Thread Monica Pisica
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

Re: [R] Pros and Cons of R

2008-05-22 Thread Monica Pisica
http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Monica Pisica Sent: Thursday, May 22, 2008 12:00 PM To: r-help@r-project.org Subject: [R] Pros and Cons of R Hi, I am doing a very informal presentation for my

Re: [R] Pros and Cons of R

2008-05-22 Thread Monica Pisica
: Thu, 22 May 2008 12:14:11 -0400 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Pros and Cons of R Monica Pisica wrote:Cons:- R has a very steep learning curve. I don't think the learning curve is any steeper than SAS programming, it is just

[R] split strings

2009-05-26 Thread Monica Pisica
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

Re: [R] split strings

2009-05-26 Thread Monica Pisica
: waclaw.marcin.kusnierc...@idi.ntnu.no To: pisican...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] split strings Monica Pisica wrote: 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

Re: [R] split strings

2009-05-27 Thread Monica Pisica
(metr_list), fixed = TRUE) It does not allow file names with .tif in the middle of them since it will delete the first occurrence rather than the last but such a situation is highly unlikely. On Tue, May 26, 2009 at 4:24 PM, Wacek Kusnierczyk wrote: Monica Pisica wrote: Hi everybody, Thank you

[R] print matrix content on plot

2007-11-19 Thread Monica Pisica
Hi, I saved as a matrix a summary of a PCA analysis and I've used barplot to plot the PCA variances. I would like to print on the same graphic the values of my matrix m1 - in other words the summary of my PCA analysis. I can do it very painstaking with text for each row and make sure that

[R] writing statistical function for boot

2007-11-26 Thread Monica Pisica
Hi everyone, I need help in writing a statistical function for bootstrap. Suppose m is a matrix with n cols and p rows, my original data. What I want to do is a bootstrap (using boot from package boot) on eigenvectors from a PCA done on m with a statistic function calculating the eigenvector

[R] error in utils:::menuInstallPkgs() for R 2.6.1

2007-11-29 Thread Monica Pisica
Hi, I have upgraded on Windows from R 2.5.1 to R2.6.1 and when i've tried to install packages with utils:::menuInstallPkgs() i've got the following error (which i never got before) Warning: unable to access index for repository http://cran.hostingzero.com/bin/windows/contrib/2.6 Do you

[R] coplot and xyplot and panel functions

2007-12-03 Thread Monica Pisica
Hi, I wrote a panel function called panelwhite.corplot. If i use this function in a coplot is working fine, but if i use same function with xyplot i get the error: Error using packet 1: plot.new has not been called yet . and so on filling all my plots. So with: coplot(be~ch|dbh1,

[R] spliting strings ...

2007-12-13 Thread Monica Pisica
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

Re: [R] spliting strings ... THANKS!

2007-12-13 Thread Monica Pisica
strings ... Monica Pisica wrote: 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

[R] cor.test formula

2007-12-17 Thread Monica Pisica
Hi everybody, I am interested in seeing how the p value is calculated for a t test for a correlation coefficient. I know that cor.test delivers the correlation coefficient and the t-test, p-value and the 95 confidence interval. I am interested in how the p-value is calculated. Usually if

Re: [R] cor.test formula

2007-12-17 Thread Monica Pisica
Hi, Thanks. I usually don't fail to google though .. I really appreciate your answer. It is exactly what i needed. Monica Date: Mon, 17 Dec 2007 10:50:30 -0500 From: [EMAIL PROTECTED] Subject: Re: [R] cor.test formula To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Monica Pisica wrote

[R] formating ftable

2008-01-09 Thread Monica Pisica
Hi all, I am using ftable and xtabs to get total counts of species per location per hight category (understory, midstory and overstory). i can save the data in almost the format i would like it to be - but not quite. Here it is an example of what i get: x - is a dataframe with the

[R] formatting ftable

2008-01-10 Thread Monica Pisica
Hi all, I am using ftable and xtabs to get total counts of species per location per hight category (understory, midstory and overstory). i can save the data in almost the format i would like it to be - but not quite. Here it is an example of what i get: x - is a dataframe with the following

[R] error in my selection

2008-01-15 Thread Monica Pisica
Hi everybody, Well, I really hoped that until now i know how to do a selection . but obviously i don't. So risking your laughing at me - here you go. I have a table with lots of vegetation data, and one column specifies in which region the data is. There are only 2 regions, region 1 and

[R] modifing barplot

2008-01-18 Thread Monica Pisica
Hi, I would like to modify how barplot plots. For reasons only my supervisor comprehends i need to do the crisscross lines in the bar thicker. If i use lwd=2 the y-axis is thicker, (i use the option beside = TRUE) but nothing else is affected by this parameter - it seems. I looked at

[R] FW: Question about making active a previously opened graphic device - SOLVED

2008-01-18 Thread Monica Pisica
Hi again, It seems that dev.set() will solve my problem. It took me quite a bit of time, search and frustration until i stumbled on dev.set ;-) Thanks anyway, Monica From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [R] Question about making active a previously opened graphic deviceDate: Fri,

Re: [R] titles with superscript and variale value

2008-01-27 Thread Monica Pisica
with superscript and variale value CC: r-help@r-project.org Try this plot(rnorm(100), main=bquote(Family ~ Gaussian ~ ; ~ D^2 == .(d2))) On 27/01/2008, Monica Pisica [EMAIL PROTECTED] wrote:Hi everyone,I am trying to write a title for a plot which has a superscript like D^2 and a value

[R] quantiles for sorted pairs of data

2009-02-02 Thread Monica Pisica
Hi everybody, Suppose I have continuous measurements of an energy waveform that is sampled discretely for different heights every 0.5m. Let's say I want to find out the height for which I have equal amount of energy above and below. My colleague did the following: a. calculate the

Re: [R] maptools: Test if point is in polygon

2009-02-06 Thread Monica Pisica
Hi, You may want to check the package sp. There is one function called point.in.polygo that might do what you want. Good luck, Monica - Message: 32 Date: Thu, 5 Feb 2009 14:51:36 + From: baptiste auguie Subject: Re: [R] maptools: Test if point is in polygon To:

[R] Aggregrate function

2009-02-12 Thread Monica Pisica
Hi, I have to recognize that i don't fully understand the aggregate function, but i think it should help me with what i want to do. xveg is a data.frame with location, species, and total for the species. Each location is repeated, once for every species present at that location. For each

Re: [R] Aggregrate function

2009-02-12 Thread Monica Pisica
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Monica Pisica Sent: Thursday, February 12, 2009 1:58 PM To: R help project Subject: [R] Aggregrate function Hi, I have to recognize that i don't fully understand the aggregate

Re: [R] Aggregrate function

2009-02-13 Thread Monica Pisica
,by(xveg,xveg['loc'],function(x)x[x$tot == max(x$tot),])) - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spec...@stat.berkeley.edu On Thu, 12 Feb 2009, Monica Pisica wrote: Hi, Thanks for the solution. Mark Leeds sent me privately a very similar

[R] joining one-to-many

2009-02-17 Thread Monica Pisica
Hello list, I am wondering if a joining one-to-many can be done a little bit easier. I tried merge function but I was not able to do it, so I end up using for and if. Suppose you have a table with locations, each location repeated several times, and some attributes at that location. The

Re: [R] joining one-to-many

2009-02-17 Thread Monica Pisica
, Monica Pisica wrote: Hello list, I am wondering if a joining one-to-many can be done a little bit easier. I tried merge function but I was not able to do it, so I end up using for and if. Suppose you have a table with locations, each location repeated several times, and some attributes

[R] statistical significance of accuracy increase in classification

2009-02-24 Thread Monica Pisica
Hi everyone, I would like to test for the statistical significance(for what it worth ...) in increasing classification accuracy and kappa statistics from different land classifications. The classifications were done using other software (like eCognition and See5), but the results were sampled

Re: [R] statistical significance of accuracy increase in classification

2009-02-24 Thread Monica Pisica
Hi again, Looking more into test statistics i realized that maybe i can use the power.prop.test to see if the difference between the 2 accuracies are zero or not. Do you have any comments about that? Also, should i considered kappa statistics also a kind of proportion and use the same test?

Re: [R] statistical significance of accuracy increase in classification

2009-02-25 Thread Monica Pisica
Max, thanks for the reply. Yes, the models are done outside R (i will see what i can do to run some of them inside R in the future ) and the sampling is extremely skewed. But we use as truth or reference results from a field exercise where people actually went and gave detailed

Re: [R] statistical significance of accuracy increase in classification

2009-02-27 Thread Monica Pisica
Hi Stefan, Thanks so much. This will help me i am sure. These past 2 days i was away on a trip so please excuse my delayed answer. Monica From: stefan.ev...@uos.de To: pisican...@hotmail.com Subject: Re: [R] statistical significance of accuracy increase in classification Date:

Re: [R] statistical significance of accuracy increase in classification

2009-02-27 Thread Monica Pisica
Thanks. I will surely try this as well. Monica Date: Thu, 26 Feb 2009 08:14:31 -0500 Subject: Re: [R] statistical significance of accuracy increase in classification From: mxk...@gmail.com To: pisican...@hotmail.com CC: r-help@r-project.org Do you know about any good reference

[R] Getting the values out of histogram (lattice)

2011-08-31 Thread Monica Pisica
Hi,   I have a relatively big dataset and I want to construct some histograms using the histogram function in lattice. One thing I am interested in is to look at differences between density and percent. I know I can use the hist function but it seems that this function gives sometimes some

Re: [R] Getting the values out of histogram (lattice)

2011-09-08 Thread Monica Pisica
Hi everybody, Thank you so much for all the explanations. Now it is much more clear to me. And sorry for the delay in answer but i move office and i was not on line for some time (not that you are really interested in that, though ;-)). I should have sent a dummy example, my real data is a

[R] matrix manipulations

2011-01-17 Thread Monica Pisica
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

Re: [R] matrix manipulations

2011-01-17 Thread Monica Pisica
water 0 15 0 0 10 16 table(d2$group,d2$cat) cat1 cat2 cat3 cat4 cat5 cat6 land 14 0 18 22 0 0 water 19 0 16 11 0 0 Hope this helps. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spec...@stat.berkeley.edu On Mon, 17 Jan 2011, Monica Pisica wrote

[R] How to write a shapefile with projection

2011-11-04 Thread Monica Pisica
Hi,   I am trying to write a shapefile with projection. I have my data in a data.frame called try and consists in xy coordinates and a numerical attribute value z1.   Libraries loaded are: sp, rgdal, raster, maptools   head(try) x       y                    z1 1 610237.1    

[R] How to write a shapefile with projection - problem solved

2011-11-04 Thread Monica Pisica
Hi, Sorry i have put such a detailed question to the list about writing a shapefile with projection. I realized that if i use writeOGR from rgdal and not the other write shapefile functions i can get a shapefile with projection recognized by ArcGIS. The command is (in case anybody wonders):  

Re: [R] How to write a shapefile with projection

2011-11-07 Thread Monica Pisica
Hi Patrick, Thanks for letting me know. I mostly use rgdal to read and write rasters so until now i kind of ignore other functionality. Unfortunately i supposed that a package dedicated to shapefiles would be the answer and had the functionality i needed. But rgdal does a nice job in saving

[R] x, y for point of intersection

2011-11-22 Thread Monica Pisica
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,

Re: [R] x, y for point of intersection

2011-11-22 Thread Monica Pisica
...@hotmail.com If it's a one off, the identify() function might be of help -- if you need something algorithmic it's harder due to floating point stuff and sampling frequencies. Let me know if that's the case. Michael On Nov 22, 2011, at 3:40 PM, Monica Pisica pisican...@hotmail.com wrote

[R] x, y for point of intersection

2011-11-23 Thread Monica Pisica
Date: Wed, 23 Nov 2011 08:11:22 + From: Hans W Borchers hwborch...@googlemail.com To: r-h...@stat.math.ethz.ch Subject: Re: [R] x, y for point of intersection Message-ID: loom.2023t085346-...@post.gmane.org Content-Type: text/plain; charset=utf-8 Monica Pisica pisicandru

Re: [R] x, y for point of intersection

2011-11-29 Thread Monica Pisica
harder due to floating point stuff and sampling frequencies. Let me know if that's the case. Michael On Nov 22, 2011, at 3:40 PM, Monica Pisica pisican...@hotmail.com wrote: Hi everyone, I am trying to get a point of intersection between a polyline and a straight

Re: [R] x, y for point of intersection

2011-12-01 Thread Monica Pisica
2011/11/29 Monica Pisica pisican...@hotmail.com Hi again, Working with my real data and not with the little example i sent to the list i discovered that segm_distance function from package pracma does not converge to 0 in all cases, even if i increase the number of iteration to 10,000

[R] Plotted circle does not go through desired points - very long email with code

2012-06-13 Thread Monica Pisica
Hi,   I am trying to solve a problem related to Poincare circles ( for more info http://www.ms.uky.edu/~droyster/courses/spring08/math6118/Classnotes/Chapter09.pdf). In a nutshell i am trying to replicate the method in the above pdf section 9.2.1. that explains in broad terms how to draw the

[R] problem with user defined panel function in xyplot

2012-09-14 Thread Monica Pisica
Hi everyone,   I am trying to do a horizonplot using my own time series data. I know that there is a horizonplot function in latticeExtra, but on closer examination i think that the graph itself is slightly wrong (it displays some regions as triangles and i think they should be trapezoids,

[R] colors in violin plot, ggplot2

2014-03-31 Thread Monica Pisica
Hi, I am using ggplot and geom_violin to build a violin plot of some with only 2 categories. All is good except that I cannot set up the colors I want or the violin plots. Either I have same color for both my categories or colors from probably rainbow(2), which are red and blue. What if I

Re: [R] colors in violin plot, ggplot2

2014-04-01 Thread Monica Pisica
)) + scale_fill_manual(values = c(orange, brown, forestgreen)) Dennis On Mon, Mar 31, 2014 at 7:43 PM, Monica Pisica pisican...@hotmail.com wrote: Hi, I am using ggplot and geom_violin to build a violin plot of some with only 2 categories. All is good except that I cannot set up

Re: [R] plotting rasters - no plot, no error

2015-04-14 Thread Monica Pisica
rasters - no plot, no error To: pisican...@hotmail.com; r-help@r-project.org On Wed, 15 Apr 2015 at 01:16 Michael Sumner mdsum...@gmail.commailto:mdsum...@gmail.com wrote: On Wed, 15 Apr 2015 at 00:50 Monica Pisica pisican...@hotmail.commailto:pisican...@hotmail.com wrote: Hi

[R] plotting rasters - no plot, no error

2015-04-14 Thread Monica Pisica
Hi, I have the current version of R installed on 2 different Windows computers. On one i can plot using the plot function a raster in geotif format, on the other it plots only the axis, an empty color bar and no raster what so ever without generating any errors or warnings. So i suspect

  1   2   >