Re: [R] specific matrix element tranformation

2012-08-16 Thread Rui Barradas
Hello, Inline Em 17-08-2012 04:39, bantex escreveu: Hi guys, After a long while I came up with this : set.seed(2) a<-matrix(rnorm(4),ncol=2) abc<-function(a) { b=matrix(NA,nrow=3,ncol=3) b[1,1]=a[1,1]+1 b[1,2]=a[2,1]*a[2,2] b[1,3]=a[2,2]+a[1,1] b[2,1]=a[1,1]-5 b[2,2]=sqrt(a[2,2]) b[2,3]=a[1,1

Re: [R] Problem Installign Packages

2012-08-16 Thread David Winsemius
On Aug 16, 2012, at 8:48 PM, wrote: To Whom It May Concern, In attempting to install the "e1071" package, I get the message below after selecting the mirror site. And what was the command you issued? -- Please select a CRAN mirror for use in this session --- Warning: unable to access in

Re: [R] Unequal splits from a column

2012-08-16 Thread Rui Barradas
Hello, Try the following. x <- c("slope (60/25/15)", "slope (90/10)", "slope (40/35/15/10)", "slope (40/25/25/10)") dat <- data.frame(X = x) lst <- unlist(lapply(dat, function(.x) gsub("slope \\((.*)\\)$", "\\1", .x))) lst <- strsplit(lst, "/") keep <- seq_len(max(unlist(lapply(lst, length))

Re: [R] ANOVA repeated measures and post-hoc

2012-08-16 Thread Henrik Singmann
Hi Diego, I am struggeling with this question also for some time and there does not seem to be an easy and general solution to this problem. At least I haven't found one. However, if you have just one repeated-measures factor, use the solution describe by me here: http://stats.stackexchange.co

Re: [R] no true negative data, need roc curve

2012-08-16 Thread vjyns
TN=0 in all cases, i had only tp, fp and fn for 6 images (two sets). suggest me how plot the roc curve. -- View this message in context: http://r.789695.n4.nabble.com/no-true-negative-data-need-roc-curve-tp4640474p4640558.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Linear mixed model using R

2012-08-16 Thread Bert Gunter
1. Post on R-sig-mixed-models, not here. 2. Models 2 and 3 make no sense (to me, anyway). What do you think they mean? (Don't answer here -- explain on the mixed models list). -- Bert On Thu, Aug 16, 2012 at 9:13 PM, li li wrote: > Dear all, > I am trying to use R to fit mixed models. > Tak

[R] Problem Installign Packages

2012-08-16 Thread ziad.elmously
To Whom It May Concern, In attempting to install the "e1071" package, I get the message below after selecting the mirror site. -- Please select a CRAN mirror for use in this session --- Warning: unable to access index for repository http://mirror.fcaglp.unlp.edu.ar/CRAN/bin/windows/contrib/2.1

Re: [R] no true negative data, need roc curve

2012-08-16 Thread vjyns
hi, TN=0 in all cases, with this how can i plot the ROC, i need help in this regard. thank you. Date: Thu, 16 Aug 2012 09:47:20 -0700 From: ml-node+s789695n4640509...@n4.nabble.com To: vijay...@outlook.com Subject: Re: no true negative data, need roc curve To clarify: Is TN = 0 o

Re: [R] specific matrix element tranformation

2012-08-16 Thread bantex
Hi guys, After a long while I came up with this : set.seed(2) a<-matrix(rnorm(4),ncol=2) abc<-function(a) { b=matrix(NA,nrow=3,ncol=3) b[1,1]=a[1,1]+1 b[1,2]=a[2,1]*a[2,2] b[1,3]=a[2,2]+a[1,1] b[2,1]=a[1,1]-5 b[2,2]=sqrt(a[2,2]) b[2,3]=a[1,1]/a[2,2] b[3,1]=a[2,2]-3 b[3,2]=a[1,1]*(a[1,2]+a[

[R] Unequal splits from a column

2012-08-16 Thread Sapana Lohani
Hi I am new to R so am struggling with the commands here I have one column in a table that looks like slope (60/25/15) slope (90/10) slope (40/35/15/10) slope (40/25/25/10) I want to have 4 columns with just the number inside the parenthesis. when there is no number that cell can have 0. I

[R] Linear mixed model using R

2012-08-16 Thread li li
Dear all, I am trying to use R to fit mixed models. Take the following example, where ind is a random effect and sample is fixed. I wanted to fit Model 1: values = ind + sample Model 2: values =ind * sample Model 3: values=ind(sample) + sample Tried to use the below for mod1, but it

Re: [R] Apply a function according to factor levels.

2012-08-16 Thread li li
Got it. Thanks so much. Hannah 2012/8/16 arun > Hi, > Try this: > dat1<-read.table(text=" > no. values ind sample > 1 0.03325 1 1 > 2 0.03305 1 1 > 3 0.03185 1 1 > 4 0.03515 1 1 > > - > - > 42 0.01085 5 2 > 4

Re: [R] Apply a function according to factor levels.

2012-08-16 Thread arun
Hi, Try this: dat1<-read.table(text="  no.   values ind sample 1  0.03325  1  1 2  0.03305  1  1 3  0.03185  1  1 4  0.03515  1  1 - - 42 0.01085  5  2 43 0.01660  5  3 44 0.03060  5  4 45 0.06605  5  5 ",sep="",header

[R] install.packages umask configuration

2012-08-16 Thread Daniel Westphal
Hello, I've been trying to setup a site library that allows the users to manage the R packages themselves, but am having an issue with permissions. As seen below, when installing a package using install.packages, the umask used is always 022. Instead, I would like it to be 002, allowing any user t

Re: [R] How to extract from a column in a table?

2012-08-16 Thread arun
HI, Slightly different way to do this: dat1<-readLines(textConnection("Name Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) Terrarossa-Blacktail-Pyeatt Complex - 1 to

[R] specific matrix element tranformation

2012-08-16 Thread bantex
Hi guys, I am trying to write a function that allows me to perform specific transformations to each element of a 2 by 2 matrix to generate a 3 by 3 matrix. Input into function-2 by 2 matrix Output from function -3 by 3 matrix For example: # a is my original 2 by 2 matrix #b is my new 3 by 3 m

[R] GEE with R: "double" overdispersion?

2012-08-16 Thread Verchinina, Lilia
Dear R users, I work with a descrete variable (sclae 0 - 27) which is highly skwed to the right (many zeros and small numbers). I measure this variable on a control and intervention cohort 5 times a year. When I analyze analyze this varoable at each time point separately and use GLM with family

Re: [R] Apply a function according to factor levels.

2012-08-16 Thread Rui Barradas
Hello, Or ?aggregate, depending on the wanted output. With the dataset provided by the op, apply function mean. dat <- read.table(text=" values ind sample 1 0.03325 1 1 2 0.03305 1 1 3 0.03185 1 1 [...etc...] 44 0.03060 5 4 45 0.06605 5 5 ", header = TRUE

Re: [R] question about A2R

2012-08-16 Thread David L Carlson
The package hasn't been modified since version 0.0-4 in August 2005. Your only hope is to try to contact the author: Package: A2R Type: Package Title: Romain Francois misc functions Version: 0.0-4 Date: 2005-08-05 Author: Romain Francois Maintainer: Romain Francois Description: Some functions of

Re: [R] Apply a function according to factor levels.

2012-08-16 Thread David L Carlson
?tapply -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of li li > Sent: Thu

[R] Apply a function according to factor levels.

2012-08-16 Thread li li
Dear all, I have a question on applying a function to the data according to factor levels. For example, for the data below, what is the best way to apply a function to "values" according to different levels of "samples" (1,2,3,4,5)? values ind sample 1 0.03325 1 1 2 0.03305 1

Re: [R] Find and install old package to R 2.11 in UNIX

2012-08-16 Thread David Winsemius
On Aug 16, 2012, at 4:33 PM, Kevin Goulding wrote: Hi, I'm having trouble installing and using the 'foreign' package in R on a UNIX machine. sessionInfo() R version 2.11.1 (2010-05-31) sparc-sun-solaris2.10 locale: [1] C attached base packages: [1] stats graph

[R] Find and install old package to R 2.11 in UNIX

2012-08-16 Thread Kevin Goulding
Hi, I'm having trouble installing and using the 'foreign' package in R on a UNIX machine. > sessionInfo() R version 2.11.1 (2010-05-31) sparc-sun-solaris2.10 locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base

[R] question about A2R

2012-08-16 Thread Guido Leoni
Dear List I'm trying to install a package not present in cran named A2R ( http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=79) After running the demo script I retrieve the following error: cannot change value of locked binding for '._a2r_counter' Please could someone give to me a t

Re: [R] r data structures

2012-08-16 Thread R. Michael Weylandt
On Thu, Aug 16, 2012 at 5:44 PM, MacQueen, Don wrote: > Whereas for a matrix or data frame, one must supply *two* index values > (even if one of them may be omitted) > mydf[ 1 , 3 ] > mydf[ , 5 ] > > mymat[ 2:5 , ] > mymat[ 3 , 4:6 ] > are valid statements. > Not quite: x <- matr

Re: [R] r data structures

2012-08-16 Thread MacQueen, Don
I don't disagree with Michael, but I would add that to me it also depends. If one thinks in terms of subsetting an object (for objects that can be subsetted) To subset a vector, one supplies *one* value for the index: myvector[3] myvector[ 2:5 ] are valid statements. Similarly for a list m

Re: [R] r data structures

2012-08-16 Thread David Winsemius
On Aug 16, 2012, at 1:50 PM, Schumacher, Jay S wrote: are these correct/accurate/sensible statements: a vector is a one dimensional object. a matrix is a two dimensional object. a list is a one dimensional object. i'm working from this web page: http://www.agr.kuleuven.ac.be/vakken/s

Re: [R] r data structures

2012-08-16 Thread Schumacher, Jay S
yes, thank you, conceptual model (rather than formal dimension attribute) is where i'm coming from at this point. It would be helpful to distinguish between a formal dimension attribute, and a (personal) conceptual model of whether or not any particu

Re: [R] r data structures

2012-08-16 Thread R. Michael Weylandt
On Thu, Aug 16, 2012 at 4:50 PM, Schumacher, Jay S wrote: > > are these correct/accurate/sensible statements: > > a vector is a one dimensional object. > a matrix is a two dimensional object. > > a list is a one dimensional object. > > i'm working from this web page: > http://www.agr.kul

Re: [R] Reference a variable inside a string and another for object assingments

2012-08-16 Thread MacQueen, Don
I sometimes do this sort of thing with "tricks" like this: sql <- "select * from mytable where dt >= 'ADATE'" dbGetQuery( con, gsub('ADATE', '2012-06-12 23:14', sql) ) Or if mydates is a vector of dates stored as a POSIXt object: for (id in mydates) { dbGetQuery( con, gsub('ADATE', form

Re: [R] r data structures

2012-08-16 Thread Schumacher, Jay S
are these correct/accurate/sensible statements: a vector is a one dimensional object. a matrix is a two dimensional object. a list is a one dimensional object. i'm working from this web page: http://www.agr.kuleuven.ac.be/vakken/statisticsbyR/someDataStructures.htm

Re: [R] r data structures

2012-08-16 Thread MacQueen, Don
It would be helpful to distinguish between a formal dimension attribute, and a (personal) conceptual model of whether or not any particular R object, or type of object, has dimension. Mention of data frames having dimension can be found in the help page for the dim() function. > foo <- 1:10 > is.

Re: [R] sensitivity and specificity in svyglm??

2012-08-16 Thread Thomas Lumley
On Thu, Aug 16, 2012 at 9:01 AM, Diana Marcela Martinez Ruiz wrote: > Hello, > > As obtained from a table svyglm clasificaion, sensitivity and specificity. > The funtion ConfusionMatrix () of the library (caret) > gives these results but not how to apply it to svyglm. > predict() will give you fi

Re: [R] r data structures

2012-08-16 Thread David Winsemius
On Aug 16, 2012, at 11:49 AM, Schumacher, Jay S wrote: hi, i'm trying to understand r data structures. i see that vectors, matrix, factors and arrays have a "dimension." there seems to be no mention of dimensionality anywhere for lists or dataframes. can i consider lists and frames to

Re: [R] How to extract from a column in a table?

2012-08-16 Thread arun
Hi, Forgot the last part. colnames(dat3New)<-c("name","slope","percentage")  dat3New name   slope    percentage 1  Budlamp-Woodcutter Complex 15 to 60% slope    (60/25/15) 2  Budlamp-Woodcutter Complex 15 to 60% slope    (60/25/15) 3 Terrar

Re: [R] How to extract from a column in a table?

2012-08-16 Thread Rui Barradas
Hello, Try the following. x <- c( "Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15)", "Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15)", "Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10)", "Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10)" ) la

Re: [R] How to extract from a column in a table?

2012-08-16 Thread arun
Hi, Try this: dat1<-readLines(textConnection("Name Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10)

Re: [R] How to extract from a column in a table?

2012-08-16 Thread Bert Gunter
?strsplit -- Bert On Thu, Aug 16, 2012 at 11:41 AM, Sapana Lohani wrote: > Hi, > > > I have a table in which one column has the name of the objects as shown below. > > > Name > > Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) > Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) > T

Re: [R] Reference a variable inside a string and another for object assingments

2012-08-16 Thread Greg Snow
Perhaps the sprintf function is what you are looking for. It is one way to insert information from a variable into a string. A couple of other options are paste, paste0, and the gsubfn package, but I think sprintf will be simplest for what you are asking. On Thu, Aug 16, 2012 at 1:30 PM, Kenneth

Re: [R] How to extract from a column in a table?

2012-08-16 Thread Jean V Adams
Sapana Lohani wrote on 08/16/2012 01:41:23 PM: > > Hi, > > I have a table in which one column has the name of the objects as shown below. You don't provide example data, so I'm not sure what you mean by a "table". I will assume that you mean a data frame. > Name > > Budlamp-Woodcutter

Re: [R] sum over extremely small numbers

2012-08-16 Thread Petr Savicky
On Thu, Aug 16, 2012 at 01:41:17PM -0400, Jie wrote: > Dear All, > > I am evaluating the value of loglikelihood and it ends up with the sum of > tiny numbers. > Below is an example: suppose I would like to calculate sum_i (log (sum_j x > [i, j] )), the index of log (x) is in the range, say (-2000,

[R] Reference a variable inside a string and another for object assingments

2012-08-16 Thread Kenneth Rose
Hi R community I copied a bit of my R code that gets some data from a database. You won't be able to run the code, but I am a beginner so you will probably understand what going on. I would like to make a variable I can refer to inside the sqlQuery. Instead of writing the start date and time (ex

Re: [R] r data structures

2012-08-16 Thread Steve Lianoglou
Hi, On Thu, Aug 16, 2012 at 2:49 PM, Schumacher, Jay S wrote: > > > hi, > i'm trying to understand r data structures. i see that vectors, matrix, > factors and arrays have a "dimension." Out of curiosity, where do you "see" that vectors and factors have a dimension? I mean -- I guess they're

[R] r data structures

2012-08-16 Thread Schumacher, Jay S
hi, i'm trying to understand r data structures. i see that vectors, matrix, factors and arrays have a "dimension." there seems to be no mention of dimensionality anywhere for lists or dataframes. can i consider lists and frames to be of fixed dimension 2? thanks, jay s _

[R] How to extract from a column in a table?

2012-08-16 Thread Sapana Lohani
Hi, I have a table in which one column has the name of the objects as shown below. Name Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15) Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10) Terrarossa-Blacktail-P

Re: [R] Error in metafor documentation on maximum iterations

2012-08-16 Thread Viechtbauer Wolfgang (STAT)
I had noticed this oversight a while ago. In an updated version of the metafor package (hopefully to be released in the near future), the argument will be called "maxiter" (as intended). Using "maxit" will then work as well, due to partial matching. Thanks for bringing this to my attention thou

Re: [R] multiple boxplots on the same figure - reducing space in between

2012-08-16 Thread Rui Barradas
Hello, Without data, I've made up my own. Try the following. x <- rnorm(100) y <- rnorm(100) bp <- boxplot(x, y, range = 0, names=c("One","Two")) bx <- bxp(bp, horizontal=TRUE, boxwex = 0.15, at = c(1, 1 + 2*0.15)) bx Note that in the call to boxplot you only need the arguments that affect t

[R] sum over extremely small numbers

2012-08-16 Thread Jie
Dear All, I am evaluating the value of loglikelihood and it ends up with the sum of tiny numbers. Below is an example: suppose I would like to calculate sum_i (log (sum_j x [i, j] )), the index of log (x) is in the range, say (-2000, 0). I am aware that exp(-744.5) will be expressed as 0 in 32 bit

Re: [R] Error in family$linkfun(mustart) : Value 1.125 out of range (0, 1)

2012-08-16 Thread David Winsemius
On Aug 16, 2012, at 12:03 AM, Dinuk Jayasuriya wrote: John/Michael, thanks for your comments. I get the following error when I run my code (the code is attached as is a section of the data set): No, it's not (anymore at least). It needs to be a mime-text formated file at the time it hits

Re: [R] ANOVA repeated measures and post-hoc

2012-08-16 Thread Robert Baer
Check out: http://rtutorialseries.blogspot.com/2011/02/r-tutorial-series-two-way-repeated.html On 8/15/2012 11:32 AM, Diego Bucci wrote: > Hi, > I performed an ANOVA repeated measures but I still can't find any good news > regarding the possibility to perform multiple comparisons. > Can anyone hel

[R] multiple boxplots on the same figure - reducing space in between

2012-08-16 Thread ziqizh...@hotmail.co.uk
Hi I have two vectors of integers and I am plotting a box plot that contains both vectors. I have done the following: vec1 < -scan("file1") vec2 < -scan("file2") boxplot(vec1, vec2, range=0, horizontal=TRUE, names=c("One","Two"), boxwex=0.15) I managed to get both boxplots on the same figure bu

[R] Pedigrees

2012-08-16 Thread Silvano Cesar da Costa
I am building several pedigrees and would like to construct the graphs automatically. I used the following program: require(kinship2) pedig = with(Dados, pedigree(id=iid, dadid=fid, momid=mid, sex=sex, famid=famid, missid=0)) for(famid in 1:15){ pedig[famid] <- pedig['famid'] pdf(paste("plo

Re: [R] no true negative data, need roc curve

2012-08-16 Thread Jessica Streicher
To clarify: Is TN = 0 or do you not know TN (N)? On 16.08.2012, at 11:51, vjyns wrote: > Hi, > > I want to plot ROC curve for my detection algorithm which detects > features in different images at two different thresholds. > > 6 different images used and obtained tp, fp and fn. No tn in my c

Re: [R] Big Data reading subsample csv

2012-08-16 Thread Greg Snow
The read.csv.sql function in the sqldf package may make this approach quite simple. On Thu, Aug 16, 2012 at 10:12 AM, jim holtman wrote: > Why not put this into a database, and then you can easily extract the > records you want specifying the record numbers. You play the one time > expense of cr

Re: [R] Big Data reading subsample csv

2012-08-16 Thread jim holtman
Why not put this into a database, and then you can easily extract the records you want specifying the record numbers. You play the one time expense of creating the database, but then have much faster access to the data as you make subsequent runs. On Thu, Aug 16, 2012 at 9:44 AM, Tudor Medallion

Re: [R] legend position help

2012-08-16 Thread Greg Snow
A quick hack to give you space between the line and point (if you only used solid lines) is to specify lty='ff' to the legend function. If you want more control then look at setting trace=TRUE and plot=FALSE and looking at the printed outcome and the return value from legend. This does not plot t

Re: [R] How to plot data in logarithmic scale

2012-08-16 Thread Jeff Newmiller
If you don't know what 1:100 is, you should (re)read the "Introduction to R" document that comes with the software. You can also try typing expressions like this alone at the command line to see what they are. If you don't know what the first argument to the ecdf function is, you need to learn

Re: [R] Color-coded Biplot of Varimax rotated factors from PCA based factor analysis

2012-08-16 Thread Jean V Adams
I suggest that you re-post your question, but this time make it easy for readers to help you by providing a simple reproducible example of your problem. Provide some fake data, or a small subset of your data using, for example, the function dput(). Trim the fat from your code. Get rid of any

Re: [R] How to plot data in logarithmic scale

2012-08-16 Thread Jean V Adams
Zuki, You did not provide any information on what table$attrib is. Using a log scale for the y-axis doesn't make much sense to me, since the y-axis is the cumulative proportion of observations, from 0 to 1. Perhaps you are interested in the log scale for the x-axis, instead? In any case, log

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread John Kane
plot(rnorm(50), main=bquote(.(x)*" "* mu * g/m^3 * " substance")) John Kane Kingston ON Canada > -Original Message- > From: dominik.refa...@gmail.com > Sent: Thu, 16 Aug 2012 12:50:57 +0200 > To: jjon...@gmail.com > Subject: Re: [R] Variables and greek letters in a plot title > > Tha

Re: [R] NADA package/cenboxplot() method: maximum censored percentage

2012-08-16 Thread Rich Shepard
On Thu, 16 Aug 2012, David L Lorenz wrote: The cenboxplot function uses cenros to estimate the censored values. The cenros function requires at least 2 uncensored observations to be able to do the regression. The cenros function does issue a warning when there are more than 80% censored data, bu

Re: [R] Column Extraction from matrix

2012-08-16 Thread David L Carlson
You could also use a 3d array instead of a list: > m <- matrix(1:400, ncol=100, byrow=TRUE) > a <- array(m, dim=c(2, 2, 100), dimnames=list(row=c(1, 2), col=c(1, 2), tbl=c(paste0("a", 1:100 > a[,,1] # First table by index col row 1 2 1 1 201 2 101 301 > a[,,"a1"] # First t

Re: [R] creation of package failed

2012-08-16 Thread EveC
Hi, Could you indicate the way you resolved?. I am having the same problem you had, and I can't resolve it. What do you mean when you say that folders have be in front?. Thanks in advance. Eva -- View this message in context: http://r.789695.n4.nabble.com/creation-of-package-failed-tp4640165

[R] Big Data reading subsample csv

2012-08-16 Thread Tudor Medallion
Hello, I'm most grateful for your time to read this. I have a uber size 30GB file of 6 million records and 3000 (mostly categorical data) columns in csv format. I want to bootstrap subsamples for multinomial regression, but it's proving difficult even with my 64GB RAM in my machine and twice tha

Re: [R] NADA package/cenboxplot() method: maximum censored percentage

2012-08-16 Thread David L Lorenz
Rich, The cenboxplot function uses cenros to estimate the censored values. The cenros function requires at least 2 uncensored observations to be able to do the regression. The cenros function does issue a warning when there are more than 80% censored data, but that is suppressed in cenboxplot.

Re: [R] Column Extraction from matrix

2012-08-16 Thread bantex
Thanks guys for the help. I finally know what to do know :) -- View this message in context: http://r.789695.n4.nabble.com/Column-Extraction-from-matrix-tp4640465p4640482.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread Dominik Refardt
Thanks a lot. Both plot(1:10) conc=5 title(main=bquote(.(conc)~mu*"g/ml substance")) and plot(0,0) conc <- 5 title(main=bquote(.(conc)*" "*mu*g/ml*" substance")) do exactly what I need. On Thu, Aug 16, 2012 at 1:33 PM, peter dalgaard wrote: > > On Aug 16, 2012, at 09:37 , Dominik Refardt wr

[R] no true negative data, need roc curve

2012-08-16 Thread vjyns
Hi, I want to plot ROC curve for my detection algorithm which detects features in different images at two different thresholds. 6 different images used and obtained tp, fp and fn. No tn in my case. in first threshold run i obtained 6 values of tp,fp and fn. In second threshold run agian i got

Re: [R] Problem with global variable building a package

2012-08-16 Thread Eva Prieto Castro
I forget one question: Where do I indicate this path? : PATH=c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;c:\MiKTeX\miktex\bin; c:\R\R-2.15\bin\i386;c:\windows;c:\windows\system32 Regards, Eva --- El jue, 16/8/12, Eva Prieto Castro escribió: De: Eva Prieto Castro Asunto: Re: [R] Problem with globa

Re: [R] Problem with global variable building a package

2012-08-16 Thread Eva Prieto Castro
Hi, I altered .internal file as Ligges indicated, but I have a problem when I make "R CMD build ": ERROR packaging into .tar.gz failed The question is the following: what is the problem? I have installed Rtools, Must I do anything else?. Obs.: I work under Windows 7, but the package generat

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread Dominik Refardt
Thanks a lot. However it's not completely what I want. There is space missing between the variable and the mu. Can this be added? On Thu, Aug 16, 2012 at 12:09 PM, Miguel Manese wrote: > Hi Dominik, > > You can try > > x <- 5 > plot(rnorm(50), main=bquote(.(x) * mu * g/m^3 * " substance")) > > R

Re: [R] sensitivity and specificity in svyglm??

2012-08-16 Thread Frank Harrell
Sensitivity and specificity are improper scoring rules so beware. They are optimized by a bogus model. Frank Diana Marcela Martinez Ruiz wrote > > Hello, > > As obtained from a table svyglm clasificaion, sensitivity and > specificity. The funtion ConfusionMatrix () of the library (caret) > giv

[R] How to call patchDVI::SweavePDF on an .Rnw which is not the master file?

2012-08-16 Thread Marius Hofert
Dear expeRts, I have a master file master.tex containing the preamble and which inputs (via \input{chapter01}, \input{chapter02}, ...) chapters. The chapters are .Rnw files. My goal is to use patchDVI::SweavePDF to compile the chapters (say, chapter.Rnw) individually (each chapter starts with sour

Re: [R] Not able to filter factor, class

2012-08-16 Thread PIKAL Petr
Hi > > After importing data from Excel through ODBC. > In the inclusion dataset, class(inclusion$Value) is coming as factor. > After filtering the data, length(inclusion$Value == 0),the answer is > coming as 4879, but actually Value contains only 225 rows. So how can I How do you know? What does

Re: [R] Color-coded Biplot of Varimax rotated factors from PCA based factor analysis

2012-08-16 Thread PIKAL Petr
Hi Without some data it is difficult to say where is difference. However from code below it seems to me that it is an adaptation from my attempt to produce colour coded points on biplot. http://tolstoy.newcastle.edu.au/R/e4/help/08/08/20012.html fit<-princomp(iris[,1:4], cor=T) biplot(fit, xl

Re: [R] Communative Matrix Multiplcation

2012-08-16 Thread Martin Maechler
> Thanks to you both. I'm not sure all.equal() was right for this situation, is > it? If the differences were to the right of the decimal and differed as a > function of precision, then I see all.equal() being the right function. But, > the differences in the reproducible code were to the left

Re: [R] twitteR location? - heading off topic

2012-08-16 Thread S Ellison
> > That worked but how do you get the location of one particular tweet. > > > You are teetering on the edge of potential stalking here, > since locating a specific tweet implies locating a specific > individual. In some countries that can be a problem. Location is currently disabled by defaul

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread peter dalgaard
On Aug 16, 2012, at 09:37 , Dominik Refardt wrote: > Hello > > This is a problem I encountered repeatedly and I found no answer that made > me really happy. I hope it is not too trivial. > > I would like to give the concentration of a substance in a plot title: > > 5 ug/ml substance > > the '

Re: [R] Communative Matrix Multiplcation

2012-08-16 Thread Doran, Harold
Thanks to you both. I'm not sure all.equal() was right for this situation, is it? If the differences were to the right of the decimal and differed as a function of precision, then I see all.equal() being the right function. But, the differences in the reproducible code were to the left of the de

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread S Ellison
> I would like to give the concentration of a substance in a plot title: > > 5 ug/ml substance Examples of including a variable in text are given in the ?plotmath page, under " ## How to combine "math" and numeric variables". For your case, plot(1:10) conc=5 title(main=bquote(.(conc)~mu*"g/ml

Re: [R] Column Extraction from matrix

2012-08-16 Thread S Ellison
> -Original Message- > I have a 4 by 100 matrix. I wish to extract each column and > make it into a 2 by 2 matrix. #make a toy 4x100 matrix: m <- matrix(rnorm(400), ncol=100) #use lapply after on-the-fly conversion to a list-like object: a.list <- lapply(as.data.frame(m),function(x) mat

Re: [R] Variables and greek letters in a plot title

2012-08-16 Thread Miguel Manese
Hi Dominik, You can try x <- 5 plot(rnorm(50), main=bquote(.(x) * mu * g/m^3 * " substance")) Regards, - Jon On Thu, Aug 16, 2012 at 3:37 PM, Dominik Refardt wrote: > Hello > > This is a problem I encountered repeatedly and I found no answer that made > me really happy. I hope it is not too t

Re: [R] reshape cast to a sparse matrix?

2012-08-16 Thread Martin Maechler
> Yin Aphinyanaphongs > on Tue, 14 Aug 2012 09:13:21 -0400 writes: > I am using the reshape package to convert a series of > values into a binary matrix. The binary matrix is very > sparse with many zeros and I'd like to use cast to > generate a sparse matrix using any

[R] Variables and greek letters in a plot title

2012-08-16 Thread Dominik Refardt
Hello This is a problem I encountered repeatedly and I found no answer that made me really happy. I hope it is not too trivial. I would like to give the concentration of a substance in a plot title: 5 ug/ml substance the '5' would be a variable and the ug should be micrograms (with greek letter

Re: [R] Column Extraction from matrix

2012-08-16 Thread Jessica Streicher
set.seed(2) a=matrix(rnorm(400),ncol=100) #use a list aList<-list() for(i in 1:dim(a)[2]){ aList[[i]]<-matrix(a[,i],ncol=2) } #get lots of variables for(i in 1:dim(a)[2]){ assign(paste("a",i,sep=""),matrix(a[,i],ncol=2)) } On 16.08.2012, at 08:07, bantex wrote: > Hi all, > > I

Re: [R] Communative Matrix Multiplcation

2012-08-16 Thread Martin Maechler
> David Reiner > on Wed, 15 Aug 2012 09:59:10 -0500 writes: > As a mathematician, I have to correct the subject line > to 'Distributive Matrix operations' -- David Yes, indeed; that was *really* disturbing to me as well, about this thread! {in addition to the fact that he s

[R] Error in family$linkfun(mustart) : Value 1.125 out of range (0, 1)

2012-08-16 Thread Dinuk Jayasuriya
John/Michael, thanks for your comments. I get the following error when I run my code (the code is attached as is a section of the data set): Error in family$linkfun(mustart) : Value 1.125 out of range (0, 1) If anyone can please provide assistance that would be much appreciated - I'm not sure i