Re: [R] Symbolic computation in R-solving system of equations

2012-08-16 Thread Søren Højsgaard
Ryacas provides an interface to yacas from R. So my suggestion is to search the web to see if yacas can solve your specific problem. Regards Søren -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jpm miao Sent: 16. august 2012

Re: [R] Reading one column .csv file

2012-08-16 Thread darnold
Worked! Thanks. David. -- View this message in context: http://r.789695.n4.nabble.com/Reading-one-column-csv-file-tp4640396p4640462.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Question: Random generation from the Zero-truncated Negative Binomial dist.

2012-08-16 Thread Andrius Budnikas
Dear All, I would be very grateful if someone could answer the following question: I am trying to randomly generate values from the zero-truncated negative binomial distribution. I already found rposnegbin in the package VGAM. However, I need a detailed code since I am trying to export it to

[R] Column Extraction from matrix

2012-08-16 Thread bantex
Hi all, I have a 4 by 100 matrix. I wish to extract each column and make it into a 2 by 2 matrix. I also want to assign names for each 2X2 matrix. For example set.seed(2) a=matrix(rnorm(400),ncol=100) a1=matrix(a[,1],ncol=2) a2=matrix(a[,2],ncol=2) . . . a100=matrix(a[,100],ncol=2) Any

[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

Re: [R] Communative Matrix Multiplcation

2012-08-16 Thread Martin Maechler
David Reiner david.rei...@xrtrading.com 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

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 have a

[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

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

2012-08-16 Thread Martin Maechler
Yin Aphinyanaphongs yinnersp...@gmail.com 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

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 dominik.refa...@gmail.com wrote: Hello This is a problem I encountered repeatedly and I found no answer that made me really happy. I

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)

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] 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

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 '5' would

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 default in

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 of

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,

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

[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

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) gives

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 jjon...@gmail.com wrote: Hi Dominik, You can try x - 5 plot(rnorm(50), main=bquote(.(x) * mu * g/m^3 *

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 pkg: 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

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 evapcas...@yahoo.es escribió: De: Eva Prieto Castro

[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

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 pda...@gmail.com wrote: On Aug 16, 2012, at 09:37 , Dominik

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. __

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

[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

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:

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 table by

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,

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 Thanks a lot.

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,

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

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] 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

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] 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 jholt...@gmail.com 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

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 case.

[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']

[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 but there

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 help

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

[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

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 the

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 though.

[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)

[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

Re: [R] r data structures

2012-08-16 Thread Steve Lianoglou
Hi, On Thu, Aug 16, 2012 at 2:49 PM, Schumacher, Jay S j...@neo.tamu.edu 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

[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] 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, 0).

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

2012-08-16 Thread Jean V Adams
Sapana Lohani lohani.sap...@ymail.com 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

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,

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 lohani.sap...@ymail.com 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

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 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) )

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

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] sensitivity and specificity in svyglm??

2012-08-16 Thread Thomas Lumley
On Thu, Aug 16, 2012 at 9:01 AM, Diana Marcela Martinez Ruiz dianamm...@hotmail.com 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()

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

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] 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',

Re: [R] r data structures

2012-08-16 Thread R. Michael Weylandt
On Thu, Aug 16, 2012 at 4:50 PM, Schumacher, Jay S j...@neo.tamu.edu 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:

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

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:

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

Re: [R] r data structures

2012-08-16 Thread R. Michael Weylandt
On Thu, Aug 16, 2012 at 5:44 PM, MacQueen, Don macque...@llnl.gov 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:

[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

[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

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

[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 1

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 AM 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:

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 francoisrom...@free.fr Maintainer: Romain Francois

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)

[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

[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

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] 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

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

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 smartpink...@yahoo.com 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

[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

[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

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

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

[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.15

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 hannah@gmail.com wrote: Dear all, I am trying to use R to fit

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] 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:

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 vec - rep(0,