[R] percentile of a given value: is there a reverse quantile function?

2012-03-03 Thread drflxms
Dear all, I am familiar with obtaining the value corresponding to a chosen probability via the quantile function. Now I am facing the opposite problem I have a value an want to know it's corresponding percentile in the distribution. So is there a function for this as well? Thank you for your

Re: [R] percentile of a given value: is there a reverse quantile function?

2012-03-03 Thread drflxms
03.03.12 14:33, schrieb peter dalgaard: On Mar 3, 2012, at 13:37 , drflxms wrote: Dear all, I am familiar with obtaining the value corresponding to a chosen probability via the quantile function. Now I am facing the opposite problem I have a value an want to know it's corresponding percentile

[R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
Dear all, I created a bivariate normal distribution: set.seed(138813) n-100 x-rnorm(n); y-rnorm(n) and plotted a scatterplot of it: plot(x,y) Now I'd like to add the 2D-standard deviation. I found a thread regarding plotting arbitrary confidence boundaries from Pascal Hänggi

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
03.03.12 15:54, schrieb drflxms: Dear all, I created a bivariate normal distribution: set.seed(138813) n-100 x-rnorm(n); y-rnorm(n) and plotted a scatterplot of it: plot(x,y) Now I'd like to add the 2D-standard deviation. I found a thread regarding plotting arbitrary confidence

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
in the package) for a simple way of showing a confidence region for bivariate data on a plot (a 68% confidence interval is about 1 SD if you just want to show 1 SD). On Sat, Mar 3, 2012 at 7:54 AM, drflxms drfl...@googlemail.com wrote: Dear all, I created a bivariate normal distribution: set.seed

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
: On Mar 3, 2012, at 17:01 , drflxms wrote: # this is the critical block, which I still do not comprehend in detail z - array() for (i in 1:n){ z.x - max(which(den$x x[i])) z.y - max(which(den$y y[i])) z[i] - den$z[z.x, z.y] } As far as I can tell, the point

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
=c(1,2,1),plot.dens=TRUE, xlab=X, ylab=Y) } Am 03.03.12 19:56, schrieb David Winsemius: On Mar 3, 2012, at 12:34 PM, drflxms wrote: Thanx a lot Greg for the hint and letting me not alone with this! Tried ellipse and it works well. But I am looking for something more precise. The ellipse

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
/v1 +x2^2/v2 is chi squared distributed with 2 degrees of freedom. So if you really want to you can try to approximate the contours in some other way, but any decent approach will just converge to the ellipse. On Sat, Mar 3, 2012 at 1:26 PM, drflxms drfl...@googlemail.com wrote: Wow, David

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
, schrieb peter dalgaard: On Mar 3, 2012, at 20:25 , drflxms wrote: Once you go into two dimensions, SD loses all meaning, and adding nonparametric density estimation into the mix doesn't help, so just stop thinking in those terms! This makes me really think a lot! Is plotting the 0,68

Re: [R] contour for plotting confidence interval on scatter plot of bivariate normal distribution

2012-03-03 Thread drflxms
. Should be equivalent in theory. Felix Am 03.03.12 22:13, schrieb peter dalgaard: On Mar 3, 2012, at 20:25 , drflxms wrote: Once you go into two dimensions, SD loses all meaning, and adding nonparametric density estimation into the mix doesn't help, so just stop thinking in those terms

[R] plotting standard deviation of multivariate normal distribution (preferred in rgl package)

2012-03-02 Thread drflxms
Dear R colleagues, for a statistics tutorial I want to develop a nice 3d-graphic of the well known target comparison/analogy of accuracy and precision (see i.e. http://en.wikipedia.org/wiki/Accuracy_and_precision for a simple hand made 2d graphic). The code for a really beautiful graphic is

Re: [R] colouring a table, data.frame or matrix in an interactive R session

2012-01-08 Thread drflxms
Am 08.01.12 13:52, schrieb Vincent Zoonekynd: On 7 January 2012 19:48, drflxms drfl...@googlemail.com wrote: as I am dealing with complex confusion matrices, I wonder whether there might be a way to colour text/tabular data in R. I.e. imagine highlighting the true positive values or certain

Re: [R] colouring a table, data.frame or matrix in an interactive R session

2012-01-08 Thread drflxms
Am 07.01.12 21:12, schrieb Michael Friendly: On 1/7/2012 5:48 AM, drflxms wrote: Hi everybody, as I am dealing with complex confusion matrices, I wonder whether there might be a way to colour text/tabular data in R. I.e. imagine highlighting the true positive values or certain classes

Re: [R] splitting strings effriciently

2012-01-08 Thread drflxms
Hi Andrew, I am aware, that this is an R-mailing list, but for such tasks (I deal a lot with huge genomic datasets) I tend to use awk and sed for preprocessing of data, in case I run into performance problems. Otherwise for handling of strings in R I recommend stringr library, but I don't know

[R] colouring a table, data.frame or matrix in an interactive R session

2012-01-07 Thread drflxms
Hi everybody, as I am dealing with complex confusion matrices, I wonder whether there might be a way to colour text/tabular data in R. I.e. imagine highlighting the true positive values or certain classes in a table. I know how to colour text in graphical output as well as how to sweave or

[R] sorting a data.frame (df) by a vector (which is not contained in the df) - unexpected behaviour of match and factor

2011-12-29 Thread drflxms
Dear R colleagues, consider my data.frame named df with 3 columns - being level, prevalence and sensitivity - and 7 rows of data (see dump below). df - structure(list(level = structure(1:7, .Label = c(0, 1, 10, 100, 1010, 11, 110), class = factor), prevalence = structure(c(4L, 2L, 3L, 5L, 6L,

Re: [R] sorting a data.frame (df) by a vector (which is not contained in the df) - unexpected behaviour of match and factor

2011-12-29 Thread drflxms
) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. drflxms drfl...@googlemail.com wrote: Dear R colleagues, consider my data.frame named df with 3 columns - being level

[R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread drflxms
Dear R colleagues, as result of a function a huge list is generated. From this result list I'd like to extract information. Think of the list i.e. as an object named listResult with the following form: [[a]] [1] [2] [3] [4] [5] [[b]] [1] [2] [3] [4] [5] [[c]] [1] [2] [3] [4] [5] where

Re: [R] How to use a variable after $ ($x) for subscripting a list, How to source from a character object (source(x))

2011-09-13 Thread drflxms
identical(A$a,A[[1]]) TRUE If this doesn't work, please clarify what exactly the object you have is and what you are trying to get out of it and I'll give a more concrete answer. On Tue, Sep 13, 2011 at 4:11 AM, drflxms drfl...@googlemail.com wrote: Dear R colleagues, as result of a function

[R] how to sort the levels of a table

2011-08-16 Thread drflxms
Dear colleagues, I have really heavy problems in sorting the results of a table according to certain features of the levels in the table. Prerequisites: It all starts with a fairly simple data set, which stores observations of 21 observers (horizontally from 1 to 21; 21 is

[R] sum of digits or how to slice a number into its digits

2011-03-04 Thread drflxms
Dear R colleagues, I face a seemingly simple problem I couldn't find a solution for myself so far: I have to sum the digits of numbers. Example: 1010 -2 100100110 - 4 Unfortunately there seems not to be a function for this task. So my idea was to use sum(x) for it. But I did not figure out how

Re: [R] sum of digits or how to slice a number into its digits

2011-03-04 Thread drflxms
Dimitris Rizopoulos: one way is using function strsplit(), e.g., x - c(100100110, 1001001, 1101, 00101) sapply(strsplit(x, ), function (x) sum(x == 1)) I hope it helps. Best, Dimitris On 3/4/2011 2:18 PM, drflxms wrote: Dear R colleagues, I face a seemingly simple problem I

[R] selecting only corresponding categories from a confusion matrix

2010-11-29 Thread drflxms
Dear R colleagues, as a result of my calculations regarding the inter-observer-variability in bronchoscopy, I get a confusion matrix like the following: 0 1 1001 1010 11 0609 11 54 36 6 1 1 260 2 1014 008 4 1004 000 0 1000 23

[R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread drflxms
Dear community, unfortunately I did not manage load the rJava package receiving the following error-message: library(rJava) Error in inDL(x, as.logical(local), as.logical(now), ...) : kann shared library 'C:/Programme/R/2.8.1/library/rJava/libs/rJava.dll' nicht laden: LoadLibrary failure:

Re: [R] can't load rJava in R 2.8.1 on Windows XP

2009-01-23 Thread drflxms
, drflxms wrote: Dear community, unfortunately I did not manage load the rJava package receiving the following error-message: library(rJava) Error in inDL(x, as.logical(local), as.logical(now), ...) : kann shared library 'C:/Programme/R/2.8.1/library/rJava/libs/rJava.dll' nicht laden

[R] how to address last and all but last column in dataframe

2008-09-06 Thread drflxms
Dear R-colleagues, another question from a newbie: I am creating a lot of simple pivot-charts from my raw data using the reshape-package. In these charts we have medical doctors judging videos in the columns and the videos they judge in the rows. Simple example of chart/data.frame input with two

Re: [R] how to address last and all but last column in dataframe

2008-09-06 Thread drflxms
of S Poetry and A Guide for the Unwilling S User) drflxms wrote: Dear R-colleagues, another question from a newbie: I am creating a lot of simple pivot-charts from my raw data using the reshape-package. In these charts we have medical doctors judging videos in the columns and the videos

Re: [R] Free SQL Database with R

2008-09-03 Thread drflxms
Hello Chibisi, I am not shore whether I completely understand your needs: Do you want to build a webpage which relies on a content management system (cms)? Do you want to collect data (i.e. survey) which later on shall be analysed using R? Or shall it be a webpage with an interactive R GUI? What

Re: [R] Free SQL Database with R

2008-09-03 Thread drflxms
that is the way it would be done), before it gets displayed on the web page. Kind Regards Chibisi On Wed, Sep 3, 2008 at 11:39 AM, drflxms [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello Chibisi, I am not shore whether I completely understand your needs: Do you want

Re: [R] convenient way to calculate specificity, sensitivity and accuracy from raw data

2008-09-02 Thread drflxms
hope it helps. Best, Dimitris Quoting drflxms [EMAIL PROTECTED]: Dear R-colleagues, this is a question from a R-newbie medical doctor: I am evaluating data on inter-observer-reliability in endoscopy. 20 medical doctors judged 42 videos filling out a multiple choice survey for each

[R] convenient way to calculate specificity, sensitivity and accuracy from raw data

2008-09-01 Thread drflxms
Dear R-colleagues, this is a question from a R-newbie medical doctor: I am evaluating data on inter-observer-reliability in endoscopy. 20 medical doctors judged 42 videos filling out a multiple choice survey for each video. The overall-data is organized in a classical way: observations (items

Re: [R] simple generation of artificial data with defined features

2008-08-24 Thread drflxms
Hi Christoph, perfect! Your code worked out of the box (copy and paste ;-). I had expected at least some lines of code, but this is really easy! So once you get used to command line, this is much more flexible (and comfortable!) than all these coloured windows. Can't tell you how happy I am,

Re: [R] simple generation of artificial data with defined features

2008-08-24 Thread drflxms
Hello all, beside saying again thank you for your help, I'd like to present the final solution of my problem and the results of the kappa-calculation: election.2005 - c(16194,13136,3494,3838,4648,4118) #data obtained via genesis-database of Statistisches Bundesamt www.destatis.de #simply cut of

Re: [R] simple generation of artificial data with defined features

2008-08-23 Thread drflxms
: Friday, August 22, 2008 12:41 PM To: drflxms; r-help@r-project.org Subject: Re: [R] simple generation of artificial data with defined features I don't think that the election data is the right data to demonstrate Kappa, you need subjects that are classified by 2 or more different raters

Re: [R] simple generation of artificial data with defined features

2008-08-23 Thread drflxms
-Sarnowski -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of drflxms Sent: Friday, August 22, 2008 6:12 AM To: r-help@r-project.org Subject: [R] simple generation of artificial data with defined features Dear R-colleagues, I am quite a newbie to R

[R] simple generation of artificial data with defined features

2008-08-22 Thread drflxms
Dear R-colleagues, I am quite a newbie to R fighting my stupidity to solve a probably quite simple problem of generating artificial data with defined features. I am conducting a study of inter-observer-agreement in child-bronchoscopy. One of the most important measures is Kappa according to