[R] [R-pkgs] frailtypack: new options !

2013-03-04 Thread Virginie RONDEAU
A new version of the package FRAILTYPACK is now available on CRAN. -- possibility to fit now a Shared and a Joint Frailty model with a log-normal distribution for the random effects. -- possibility to deal with interval-censored data (for a shared frailty model) -- possibility to fit a joint

Re: [R] Metafor SMCR Pre-Post Effect sizes

2013-03-04 Thread Viechtbauer Wolfgang (STAT)
Absolutely correct. The documentation wasn't clear on that. Changed for the next version of the package. And the escalc() function now no longer checks for sd2i, since it is not needed anyway (for SMCR). For now, you will just have to set sd2i to something (e.g., 0). Thanks for bringing this

[R] installing biOps on MacOSX fails

2013-03-04 Thread ishi soichi
version.string R version 2.15.2 (2012-10-26) I am trying to install biOps on MacOS X 10.8.2 First, I have tiff, fftw-3, jpeg and set paths like cd /usr/include sudo ln -s /usr/local/include/fftw3.h for x in /usr/local/include/j*.h; do sudo ln -s $x; done for x in /usr/local/include/tiff*.h; do

[R] How to loop several binary files from two directories?

2013-03-04 Thread Jonsson
I have two binary files(rasters) with the same dimensions. The first file is called `over` and the second is `corr`. I want to replace values in `over` by `NA` whenever `corr` is greater than 0.5. to read the two files we can use: conne - file(C:corr.bin,rb) over -

Re: [R] installing biOps on MacOSX fails

2013-03-04 Thread Prof Brian Ripley
See the recent discussion on R-sig-mac (the place to ask questions about OS X). On 04/03/2013 11:00, ishi soichi wrote: version.string R version 2.15.2 (2012-10-26) I am trying to install biOps on MacOS X 10.8.2 First, I have tiff, fftw-3, jpeg and set paths like cd /usr/include sudo ln -s

[R] Excel User interface for R

2013-03-04 Thread Tammy Ma
HI, Assume I have the data frame generated from R as the following: Product Price market_share A 10010% B 1109% C 12020% D 90 61% What I want to do is to have this kind of excel user interface by

[R] survfit plot question

2013-03-04 Thread Steve Einbender
Hello, I create a plot from a coxph object called fit.ads4: plot(survfit(fit.ads4)) plot is located at: https://www.dropbox.com/s/9jswrzid7mp1u62/survfit%20plot.png I also create the following survfit statistics: print(survfit(fit.ads4),print.rmean=T) Call: survfit(formula = fit.ads4)

[R] How to treat dominant alternatives infeasible/unrealistic alternatives in the choice set

2013-03-04 Thread Jonson Javier
Please help! I made an oa design using the DoE package of R.Then, I created the 18 blocks containing 4 choice sets and converted these into questionnaire form using rotation method of the CE support package.However,some of the alternatives in the choice sets are infeasible/unrealistic and

[R] robustbase adjbox segfault - memory not mapped

2013-03-04 Thread Baan
Hi, I encountered a segfault, memory not mapped error when using adjbox in robustbase. In trying to recreate the issue I found that the error occurs only for large sample size. Here is the code. require(robustbase) Loading required package: robustbase x - rnorm(10) y - rep(1, 10)

[R] R function for estimating historical-VaR

2013-03-04 Thread Аскар Нысанов
Hi everyone!! I am new in R and I want to create a simple R function for estimating historical-VaR. In y_IBM returns, there are 2300 observations. For evaluation I take the next 2000 observations, then I abandon the latest 300 observations. Firstly, I use the window which has the fix length

Re: [R] Results from clogit out of range?

2013-03-04 Thread Terry Therneau
I'm late to this discussion, but let me try to put it in another context. Assume that I wanted to know whether kids who live west of their school or east of their shool are more likely to be early (some hypothesis about walking slower if the sun is in their eyes). So I create a 0/1 variable

[R] R broken after upgrade to 2.15.3 (Ubuntu 12.10, 64bit)

2013-03-04 Thread Ulrich Bodenhofer
Hi, I am using R on Ubuntu 12.10 (64bit). This morning, Ubuntu's software updater automatically installed updates to R's base system (version 2.15.3; via the CRAN PPA). Now R does not work anymore. Here is what I get when I simply enter R on the shell prompt: bodenhof FUKUOKA~R cannot find

Re: [R] R broken after upgrade to 2.15.3 (Ubuntu 12.10, 64bit)

2013-03-04 Thread Ista Zahn
Hi, Please see http://stackoverflow.com/q/15090817, where it was reported that sudo chmod 644 /etc/R/Renviron fixed this issue. If that doesn't work for you, consider posting to https://stat.ethz.ch/mailman/listinfo/r-sig-debian Best, Ista On Mon, Mar 4, 2013 at 9:56 AM, Ulrich Bodenhofer

Re: [R] R broken after upgrade to 2.15.3 (Ubuntu 12.10, 64bit)

2013-03-04 Thread Dirk Eddelbuettel
On 4 March 2013 at 10:01, Ista Zahn wrote: | Please see http://stackoverflow.com/q/15090817, where it was reported | that sudo chmod 644 /etc/R/Renviron fixed this issue. If that doesn't That issue affected only pre-releases of 2.15.3. The 2.15.3 release does not have that issue. It also should

Re: [R] using reserved words in R, and reuse variable names in different functions

2013-03-04 Thread MacQueen, Don
Yes, it can cause problems. And speaking for myself, I'd say it's not worth the risk, because it's easy enough to find alternative variable names that are close enough to the notation of your formulas that remembering should be no problem. For example, tt, cc, and mmatrix might do it. -Don --

Re: [R] Metafor SMCR Pre-Post Effect sizes

2013-03-04 Thread Markus Kösters
Dear Wolfgang, Thank you for your clarification - and your excellent package ! Best wishes, Markus -Ursprüngliche Nachricht- Von: Viechtbauer Wolfgang (STAT) [mailto:wolfgang.viechtba...@maastrichtuniversity.nl] Gesendet: Montag, 4. März 2013 10:45 An: Markus Kösters;

Re: [R] Problems with xlsx and rjava

2013-03-04 Thread Siddharth Khera
I was also facing the same problem. It may be possible that in your computer “Java” may not be installed, try installing Java. My problem was solved after installing it. http://www.java.com/en/download/manual.jsp Thanks. Sent from Windows Mail [[alternative HTML version deleted]]

Re: [R] How to loop several binary files from two directories?

2013-03-04 Thread arun
HI, Check these links: http://r.789695.n4.nabble.com/Re-new-question-td4659908.html http://r.789695.n4.nabble.com/Re-reading-data-td4658705.html#a4659751 It shows reading files (not binary files) from multiple subdirectories and doing some calculations. You may need to change it according to

[R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Kerry
It seems within the last ~3 months Ive been having issues with writing text or csv files from a R data frame.  The problem is multifold and it is hard to filter  out what is going on and where the problem is.  So, Im hoping someone else has come across this and may provide insight.   My

[R] Version Upgrade and Packages

2013-03-04 Thread Rich Shepard
I just upgraded from 2.15.2 to 2.15.3 on our Slackware systems and see the following when testing that the new version properly loads: The following object(s) are masked from 'package:stats': cor The following object(s) are masked from 'package:base': as.Date, as.Date.numeric What,

[R] urgent: question concerning data manipulation

2013-03-04 Thread David Studer
Hello everyone! Does anyone of you know how I could solve the following problem. I guess, it is not a very difficult question, but I simply lack of the right idea: I have a dataset containing data of convictions. This dataset contains 4 columns: - personId: individual number that identifies the

Re: [R] issue creating a subset

2013-03-04 Thread MacQueen, Don
What Jim said separately is correct, and I would suggest following his advice. But there are some points worth looking at in your method. See this example: item1 - item2 - item3 - item4 - 1:4 matrix1-cbind(item1, item2, item3, item4) z - c(TRUE,TRUE,FALSE,TRUE) matrix2 -

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Duncan Murdoch
On 04/03/2013 10:09 AM, Kerry wrote: It seems within the last ~3 months Ive been having issues with writing text or csv files from a R data frame. The problem is multifold and it is hard to filter out what is going on and where the problem is. So, Im hoping someone else has come across

Re: [R] Version Upgrade and Packages

2013-03-04 Thread MacQueen, Don
Hi Rich, Immediately after you see one of those messages, do, e.g., find('cor') It should tell you that you have more than one object named 'cor' in your search path, and where they all are. Then you can decide if it's what you want (probably not, but can't say from here). -Don -- Don

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Kerry
Here's the first 5 lines of my dataset: structure(list(id = structure(c(1L, 1L, 1L, 1L, 1L), .Label = c(F07001,  F07002, F07003, F07004, F07005, F07006, F07008, F07009,  F07010, F07011, F07014, F07015, F07017, F07018, F07019,  F07020, F07021, F07022, F07023, F07024, F10001, F10002,  F10004,

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Duncan Murdoch
On 04/03/2013 10:52 AM, Kerry wrote: Here's the first 5 lines of my dataset: structure(list(id = structure(c(1L, 1L, 1L, 1L, 1L), .Label = c(F07001, F07002, F07003, F07004, F07005, F07006, F07008, F07009, F07010, F07011, F07014, F07015, F07017, F07018, F07019, F07020, F07021, F07022, F07023,

Re: [R] urgent: question concerning data manipulation

2013-03-04 Thread MacQueen, Don
Here is one way. There will be many ways to do it; I offer this one because it is very general. -Don tmp - split(testdata, testdata$personId) myfun - function(df) { dfo - df if (any(df$law=='SVG')) dfo$svg - 1 else dfo$svg - 0 dfo } tmpo - lapply(tmp,myfun) testout - do.call('rbind',

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Kerry
I realize my command code is not writing a CSV file, I already pointed out that CSV file seems to work OK but not in the TXT format.  Regardless of that, there should be no problems in ArcGIS in reading the date column - in ArcGIS it will simply recognize it as a text field by default.  As I

Re: [R] urgent: question concerning data manipulation

2013-03-04 Thread ONKELINX, Thierry
Have a look at cast() from the reshape package. library(reshape) cast(personId ~ law, data = testdata, value = article, fun = length) cast(personId ~ law, data = testdata, value = article, fun = function(x){1 * (length(x) 0)}) Van:

Re: [R] urgent: question concerning data manipulation

2013-03-04 Thread Eik Vettorazzi
There’s more than one way to skin a cat, here is another mm-model.matrix(~personId+law+0,testdata) merge(testdata,aggregate(mm[,-1],list(personId=mm[,personId]),max)) cheers Am 04.03.2013 16:44, schrieb David Studer: Hello everyone! Does anyone of you know how I could solve the following

Re: [R] robustbase adjbox segfault - memory not mapped

2013-03-04 Thread Martin Maechler
B == Baan baanba...@gmail.com on Mon, 4 Mar 2013 15:02:02 +0530 writes: B Hi, I encountered a segfault, memory not mapped error B when using adjbox in robustbase. In trying to recreate B the issue I found that the error occurs only for large B sample size. Here is the code.

Re: [R] Version Upgrade and Packages

2013-03-04 Thread Rich Shepard
On Mon, 4 Mar 2013, MacQueen, Don wrote: Immediately after you see one of those messages, do, e.g., find('cor') It should tell you that you have more than one object named 'cor' in your search path, and where they all are. Then you can decide if it's what you want (probably not, but can't

Re: [R] issue creating a subset

2013-03-04 Thread Pablo Menese
Thanks a lot!!! On Mon, Mar 4, 2013 at 12:46 PM, MacQueen, Don macque...@llnl.gov wrote: What Jim said separately is correct, and I would suggest following his advice. But there are some points worth looking at in your method. See this example: item1 - item2 - item3 - item4 - 1:4

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Duncan Murdoch
On 04/03/2013 11:15 AM, Kerry wrote: I realize my command code is not writing a CSV file, I already pointed out that CSV file seems to work OK but not in the TXT format. Sorry. In that case, I think you really do have to go to R-sig-Geo to find someone who knows about ArcGIS. Duncan

Re: [R] Mysterious issues with reading text files from R in ArcGIS and Excel

2013-03-04 Thread Jeff Newmiller
Your description of diagnosis uses non-R software (off topic here). Please either describe the difference in the files (you may need a hex editor or the hexbin package to detect the differences) or supply the files that behave differently (this may require some alternate route than this mailing

[R] Choosing nlme or lme4?

2013-03-04 Thread Filipe Carvalho
Hi List,   I’ m analysing the selectivity of resting site use by forest carnivores through mixed modelling techniques and I wonder which will be the best r package to deal with several aspects simultaneously: -          binomial variable response; -          possible spatial

Re: [R] robustbase adjbox segfault - memory not mapped

2013-03-04 Thread Baan
Thank you Martin. Look forward to the fix. Regards Baan On Monday 04 March 2013 10:19 PM, Martin Maechler wrote: B == Baan baanba...@gmail.com on Mon, 4 Mar 2013 15:02:02 +0530 writes: B Hi, I encountered a segfault, memory not mapped error B when using adjbox in robustbase.

Re: [R] R function for estimating historical-VaR

2013-03-04 Thread Blaser Nello
Does it just not work or does it not do the right thing? The reason it doesn't work is that you are writing 'T = length(returns) x_foc = vector(length=n) N = T-(n+1)' on one line instead of using three lines. However, your description of what you want to do also doesn't seem to correspond to

Re: [R] Choosing nlme or lme4?

2013-03-04 Thread Bert Gunter
1. You are right with your statements. 2. You should address all further discussion to the r-sig-mixed-models list, not here. -- Bert On Mon, Mar 4, 2013 at 9:06 AM, Filipe Carvalho filipescpcarva...@yahoo.com wrote: Hi List, I’ m analysing the selectivity of resting site use by forest

[R] A problem with text manipulation

2013-03-04 Thread Christofer Bogaso
Hello again, Let say I have following vector: set.seed(1) Vec - sample(LETTERS[1:5], 10, replace = TRUE) Vec Now with each repeated letter, I like to add suffix programatically. Therefore I want to get following vector: c(B, B1, C, E, B2, E1, E2, D, D1, A) Can somebody tell me how to achieve

Re: [R] Version Upgrade and Packages

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 8:28 AM, Rich Shepard wrote: On Mon, 4 Mar 2013, MacQueen, Don wrote: Immediately after you see one of those messages, do, e.g., find('cor') It should tell you that you have more than one object named 'cor' in your search path, and where they all are. Then you can

Re: [R] Excel User interface for R

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 5:39 AM, Tammy Ma wrote: HI, Assume I have the data frame generated from R as the following: Product Price market_share A 10010% B 1109% C 12020% D 90 61% What I want

Re: [R] A problem with text manipulation

2013-03-04 Thread William Dunlap
Use ave(). The following tries to save a little time and simplify things by only processing the duplicated entries. Vec [1] B B C E B E E D D A f - function(v) { + d - duplicated(v) + v[d] - ave(v[d], v[d], FUN=function(vdi)paste0(vdi, seq_along(vdi))) + v + }

Re: [R] A problem with text manipulation

2013-03-04 Thread Bert Gunter
Christofer: This reminds me of those IQ puzzles I took so many years ago as a kid: Given the numbers 7, 22, 43, 5, 26,...what are the next 3 numbers in this series? I don't recall having a clue, and when I got older and more mathematical, generally came to the conclusion that it could

Re: [R] Raster images and saving with original pixel dimensions in tiff, jpeg, or png perferablly.

2013-03-04 Thread Paul Murrell
Hi It sounds like you just want to control the size of the external raster image that you are creating. For example ... library(grid) im - matrix(0:1, ncol=3, nrow=3) # grid.newpage() grid.raster(im, interpolate=FALSE) png(ident.png, 3, 3) grid.raster(im, interpolate=FALSE) dev.off()

[R] package ‘contingency.tables’ is not available (for R version 2.15.2)

2013-03-04 Thread Joanna Papakonstantinou
I am trying to create contingency tables (to evaluate prior to performing Pearson's Chi-Squared test for independence). I would like to see column and row totals as well as expected and observed values and cell counts. I tried to use the package contingency. tables but get the following warning:

[R] Upgrading to R version 2.15.3 under Fedora.

2013-03-04 Thread Rolf Turner
From time to time since the release of R 2.15.3 was announced I have tried to upgrade from 2.15.2 by doing sudo yum install R I keep getting Package R-2.15.2-1.fc17.x86_64 already installed and latest version Nothing to do Has the upgrade really not propagated to the Fedora

Re: [R] histogram

2013-03-04 Thread arun
Hi Elisa, I am not sure about the output you wanted. dat1- read.csv(rightest.csv,sep=,,header=TRUE,check.names=FALSE)  dat2- as.dist(dat1[,-1],upper=F,diag=F) vec1- as.vector(dat2) label1=c(0-25,25-50,50-75) Count1- as.data.frame(table(cut(vec1,breaks=seq(0,75,25),labels=label1))) #Overall count

Re: [R] SAS and R complement each other

2013-03-04 Thread Rolf Turner
I never saw the original note nor its resubmission. Nor could I find it in the R-help archives. Is it just me? Not that it really matters a damn --- I don't use SAS either --- I'm just curious, and find the situation mysterious. cheers, Rolf On 03/04/2013 04:32 PM, Frank

Re: [R] Upgrading to R version 2.15.3 under Fedora.

2013-03-04 Thread Marc Schwartz
On Mar 4, 2013, at 1:48 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: From time to time since the release of R 2.15.3 was announced I have tried to upgrade from 2.15.2 by doing sudo yum install R I keep getting Package R-2.15.2-1.fc17.x86_64 already installed and latest version

Re: [R] SAS and R complement each other

2013-03-04 Thread Ista Zahn
On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: I never saw the original note nor its resubmission. Nor could I find it in the R-help archives. Is it just me? No, same here. Not that it really matters a damn --- I don't use SAS either --- I'm just curious, and

Re: [R] A problem with text manipulation

2013-03-04 Thread arun
Hi, You could use: res-unsplit(lapply(split(Vec,Vec),function(x) if(length(x)1) c(head(x,1),paste0(head(x,-1),seq_along(head(x,-1 else x),Vec)  res # [1] B  B1 C  E  B2 E1 E2 D  D1 A A.K. - Original Message - From: Christofer Bogaso bogaso.christo...@gmail.com To: r-help

Re: [R] A problem with text manipulation

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 11:31 AM, William Dunlap wrote: Use ave(). The following tries to save a little time and simplify things by only processing the duplicated entries. Vec [1] B B C E B E E D D A f - function(v) { + d - duplicated(v) + v[d] - ave(v[d], v[d],

Re: [R] package ‘contingency.tables’ is not available (for R version 2.15.2)

2013-03-04 Thread Milan Bouchet-Valat
Le lundi 04 mars 2013 à 12:37 -0600, Joanna Papakonstantinou a écrit : I am trying to create contingency tables (to evaluate prior to performing Pearson's Chi-Squared test for independence). I would like to see column and row totals as well as expected and observed values and cell counts. I

Re: [R] Upgrading to R version 2.15.3 under Fedora.

2013-03-04 Thread Rolf Turner
Thanks Marc. All very clear, cogent and useful. Sorry for not sending my original post to r-sig-fedora; I *knew* about that, but had (in my dotage?) forgotten. cheers, Rolf On 03/05/2013 09:01 AM, Marc Schwartz wrote: On Mar 4, 2013, at 1:48 PM, Rolf Turner

Re: [R] SAS and R complement each other

2013-03-04 Thread Milan Bouchet-Valat
Le mardi 05 mars 2013 à 08:57 +1300, Rolf Turner a écrit : I never saw the original note nor its resubmission. Nor could I find it in the R-help archives. Is it just me? Not that it really matters a damn --- I don't use SAS either --- I'm just curious, and find the situation mysterious.

Re: [R] SAS and R complement each other

2013-03-04 Thread Peter Ehlers
On 2013-03-04 12:04, Ista Zahn wrote: On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: I never saw the original note nor its resubmission. Nor could I find it in the R-help archives. Is it just me? No, same here. Think Nabble!!! (where there are often waits for

Re: [R] interactive visualizations - anyone use SVGAnnotation?

2013-03-04 Thread Paul Murrell
Hi An alternative is the 'gridSVG' package http://www.stat.auckland.ac.nz/~paul/gridSVG/gridsvg.pdf Paul On 02/03/13 06:12, Joseph Clark wrote: Hi all:I found some great demonstrations of interactive presentation graphics generated in R with the SVGAnnotation package,

[R] What package can I use to help me categorize comment responses?

2013-03-04 Thread Lopez, Dan
Hi, We have comment questions from a survey that we need to categorize. What package and functions can I use in R to help do this? Daniel Lopez Lawrence Livermore Labs SHRM [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] SAS and R complement each other

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 12:18 PM, Peter Ehlers wrote: On 2013-03-04 12:04, Ista Zahn wrote: On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: I never saw the original note nor its resubmission. Nor could I find it in the R-help archives. Is it just me? No, same

Re: [R] histogram

2013-03-04 Thread arun
Hi, Sorry, I forgot names(which() Names2-apply(res1,1,function(x) paste(names(which(x!=0)),collapse=,)) res2- data.frame(Frequency=apply(res1,1,function(x) sum(1*(x!=0))), stations=Names2,stringsAsFactors=FALSE)  res2  #     Frequency #0-25    121 #25-50   122 #50-75    76    

Re: [R] What package can I use to help me categorize comment responses?

2013-03-04 Thread MacQueen, Don
Daniel, Looking at CRAN, the following might be useful: memiscTools for Management of Survey Data, Graphics, Programming, Statistics, and Simulation questionr Functions to make surveys processing easier surveyanalysis of complex survey samples surveydataTools to

Re: [R] histogram

2013-03-04 Thread arun
Hi, dat1- read.csv(rightest.csv,sep=,,header=TRUE,check.names=FALSE)  dat2- as.dist(dat1[,-1],upper=F,diag=F) vec1- as.vector(dat2) label1=c(0-25,25-50,50-75) Name1-unlist(lapply(0:123,function(i) rep(i+1,i))) dat3-data.frame(Name1,vec1) res-t(aggregate(.~Name1,data=dat3,function(x)

Re: [R] package ‘contingency.tables’ is not available (for R version 2.15.2)

2013-03-04 Thread Joanna Papakonstantinou
Thank you. I actually ended up using: CrossTable(mdt) Cell Contents |-| | N | | Chi-square contribution | | N / Row Total | | N / Col Total | | N / Table Total | |-| Total Observations in

Re: [R] SAS and R complement each other

2013-03-04 Thread Peter Ehlers
On 2013-03-04 12:30, David Winsemius wrote: On Mar 4, 2013, at 12:18 PM, Peter Ehlers wrote: On 2013-03-04 12:04, Ista Zahn wrote: On Mon, Mar 4, 2013 at 2:57 PM, Rolf Turner rolf.tur...@xtra.co.nz wrote: I never saw the original note nor its resubmission. Nor could I find it in the

Re: [R] What package can I use to help me categorize comment responses?

2013-03-04 Thread Rolf Turner
On 03/05/2013 09:28 AM, Lopez, Dan wrote: Hi, We have comment questions from a survey that we need to categorize. What package and functions can I use in R to help do this? There was a fairly recent posting about a package called qdap that might be relevant. See:

[R] Syntax for error messages

2013-03-04 Thread Fisher Dennis
R 2.15 OS X and Windows Colleagues, I am running a lengthy R script ( 20K lines of code) within a GUI build in RealBasic. There are rare instances in which an error is triggered in R. I am trying to trap these based on their syntax. I have identified three general formats for error

Re: [R] Syntax for error messages

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 3:09 PM, Fisher Dennis wrote: R 2.15 OS X and Windows Colleagues, I am running a lengthy R script ( 20K lines of code) within a GUI build in RealBasic. There are rare instances in which an error is triggered in R. I am trying to trap these based on their syntax.

[R] Learning the R way – A Wish

2013-03-04 Thread andrewH
There is something that I wish I had that I think would help me a lot to be a better R programmer, that I think would probably help many others as well. I put the wish out there in the hopes that someone might think it was worth doing at some point. I wish I had the code of some substantial,

[R] Automatically fix big jumps in one variable due to anomalies

2013-03-04 Thread Cesar Terrer
Hi, I am attaching a plot where you can see there are a few jumps (plots 1, 4, 5 and 6), due to incidents with the measuring sensors (basically someone touching the sensor). I need to revert those changes to have a plot without unreal measurements, so make those fragments go back to its original

Re: [R] Learning the R way – A Wish

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 3:42 PM, andrewH wrote: There is something that I wish I had that I think would help me a lot to be a better R programmer, that I think would probably help many others as well. I put the wish out there in the hopes that someone might think it was worth doing at some

Re: [R] histogram

2013-03-04 Thread arun
Hi, If you meant to get the array index from `res1`, then this will do it.  But, if it is from 'dat3`, it will  be huge as each index is unique. indx-which(apply(res1,1,function(x) x!=0) ,arr.ind=TRUE)  Names2-do.call(rbind,lapply(1:3,function(i) {x-indx[indx[,2]==i,];

Re: [R] Results from clogit out of range?

2013-03-04 Thread Lisa S
Thanks for the illustrative example. In my project actually my supervisor wanted to estimate the probabilities using a conditional MLE approach, which happens to be the case that *uses clogit() while trying to achieve aim b in your words*. I learned that clogit() is based on the sufficient

[R] multiple plots and looping assistance requested

2013-03-04 Thread Irucka Embry
Hi all, I have a couple of questions. 1) Is there a more effective way to remove the following pattern (patternrm) from the station_id_Timeseries (see below) patternrm - c(_2000_4_OND, _2001_1_JFM, _2001_2_AMJ, _2001_3_JAS, _2001_4_OND, _2002_1_JFM, _2002_2_AMJ, _2002_3_JAS, _2002_4_OND,

Re: [R] Automatically fix big jumps in one variable due to anomalies

2013-03-04 Thread Duncan Mackay
Hi Cesar Not sure what you actually want to accomplish ?rle may give you some ideas eg (I have added some to return to the good section) x = c(246,251,250,255,5987,5991,5994,599,255,259,262,267) xdiff = diff(x) xdiff [1] 5-1 5 5732 4 3 -5395 -344 4 3 5

Re: [R] multiple plots and looping assistance requested

2013-03-04 Thread arun
Hi, May be you can try: res1- gsub(\\_.*\\_.*\\_.*,,x)  res2-sub((\\w)(\\w)(\\w)(\\w)(\\w)(\\w)(\\w)(\\w)(\\w)(\\w)(\\w)$, , x,perl=TRUE)  identical(res1,res2) #[1] TRUE A.K. - Original Message - From: Irucka Embry iruc...@mail2world.com To: r-help@r-project.org Cc: Sent: Monday,

Re: [R] Learning the R way – A Wish

2013-03-04 Thread Andrew Koeser
The book that helped me break into R and more advanced texts was Crawley's Statistics: An Introduction with R. Very light read that assumes no prior knowledge with stats or R. I am using it to teach my fellow grad students R and all agree it was worth scrimping pennies to get. He also has a

[R] how_to_create_a_package?

2013-03-04 Thread Jyoti Sharma
hello sir myself Jyoti Sharma, and i am working as preoject fellow in IGIB Delhi. I need your help to know how to create a package as well as how to post that package to the CRAN mirror, for public use. i have used package.skeleton() command but its not working properly. So, please suggest me

Re: [R] Learning the R way – A Wish

2013-03-04 Thread Mark Leeds
Hi Andrew: Not that I've gone through it all yet but the draft of hadley's book at https://github.com/hadley/devtools/wiki/Introduction has a lot if not all of the commands you refer to and all of their gory details along with many examples. No matter what you're budget, given that the book will

Re: [R] how_to_create_a_package?

2013-03-04 Thread David Winsemius
On Mar 4, 2013, at 7:42 PM, Jyoti Sharma wrote: hello sir myself Jyoti Sharma, and i am working as preoject fellow in IGIB Delhi. I need your help to know how to create a package as well as how to post that package to the CRAN mirror, for public use. i have used package.skeleton()

Re: [R] multiple plots and looping assistance requested

2013-03-04 Thread Irucka Embry
Hi Arun, thank you for your assistance. The code for part 1 worked perfectly. I am including here a list of all of the site names for part 2. Due to the nature of the station ids it has been difficult for me to find a good pattern to use with regular expressions. Thank you all in advance for

[R] R Compiler Options in the linux (ubuntu) Binaries? AVX?

2013-03-04 Thread ivo welch
curiosity question: I was wondering whether the R binaries and BLAS libraries for ubuntu linux are compiled using SSE4 and AVX support. this probably can go a long way towards a unified memory bus GPGPU substitute. Ivo Welch (ivo.we...@gmail.com) http://www.ivo-welch.info/

[R] Generating 1-bit and 8-bit BMP files using R

2013-03-04 Thread Ingo Reinhold
Hi, I'm trying to use the data which I generate within R to make images in .bmp format to be lateron printed by a printer. My first thought was the RImageJ package, but this seems to be discontinued. What I am currently doing is generating a matrix of grey values, which needs to be parsed