Re: [R] (no subject)

2013-05-28 Thread Pascal Oettli
Hello, I would say: 1. Which R version? 2. Which OS? 3. Where is the requested "commented, minimal, self-contained, reproducible code"? Regards, Pascal On 05/29/2013 10:05 AM, alex mutuku wrote: hallo,i have a problem with running some code in R2Winbugs am getting the following error.Erro

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread peter dalgaard
On May 28, 2013, at 19:26 , Mark Breman wrote: > Thanks everyone for the suggestions. > > If the problem is caused by a restriction in one of the (software) > components i'm using (OS, terminal etc), should the remaining of the pasted > code simply be missing after the point where the error occu

Re: [R] Rank Amateur Question

2013-05-28 Thread Pascal Oettli
Hi, I do not use R for Windows. But I would say that you have to run 'Rscript.exe' in a "CMD" prompt, if I am not mistaken. Not in 'Rgui'. In 'Rgui', use 'source'. Hope this helps, Pascal On 05/29/2013 03:07 AM, Mark Russell wrote: Greetings, I have just downloaded R onto a 64bit PC runni

[R] Distribution, heteroskedasticity etc. tests for glm, tobit and heckit?

2013-05-28 Thread Michal Kvasnička
Hallo. Is there any package / code snippet to test the distribution assumption, heteroskedasticity, omitted variables, and linearity with the models estimated by maximum likelyhood? I especially need it for three type of models: * binary choice (probit and probit with non-normal distribution) --

[R] (no subject)

2013-05-28 Thread alex mutuku
hallo,i have a problem with running some code in R2Winbugs am getting the following error.Error in FUN(X[[2L]], ...)  What might be the problem.with kind regards.Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list htt

Re: [R] Discrete simulated annealing

2013-05-28 Thread Enrico Schumann
On Tue, 28 May 2013, Marcus Nunes writes: > Hello all > > I'm trying to use simulated annealing to optimize a function. I know I can > use ?optim with method="SANN" to do it. > > However, I'd like to make optim to search for the best solution among a set > of possible points in my domain, and not

[R] identical() function issue on R when built with ICC, ICL

2013-05-28 Thread Beto .
Hello Guys, I am trying to build R using the Intel compilers: ICC, ICPC. The first time I ran the built I got the error below: mlutils.c(107): error: floating-point operation result is out of range double NA_REAL = ML_NAN; ^ mlutils.c(108): error: floating-point operation re

[R] Rank Amateur Question

2013-05-28 Thread Mark Russell
Greetings, I have just downloaded R onto a 64bit PC running Microsoft 7 Home Edition via Rgui. I have quite a bit of programming experience, though not as a professional programmer. I am a Measurement and Assessment professional (standardized testing). I would like to be able to write R scripts

Re: [R] Problems with merge

2013-05-28 Thread arun
HI, Possibly R FAQ: 7.31  data1New<-data1  data1New$A<- round(data1New$A,2)  data2New<- data2  data2New$A<- round(data2New$A,2) merge(data1New,data2New,by="A") #    A   B    C #1 0.0 0.9 10.0 #2 1.1 0.6 11.1 #3 1.4 0.7 11.4 #4 3.1 0.4 13.1 #5 4.4 0.8 14.4 A.K. Hello, Lets say we have these

Re: [R] Obtaing the maximum

2013-05-28 Thread arun
Hi, May be this helps: a1<-c(1:5,1:3,rep(1,2),1:5,1:3)  a1 # [1] 1 2 3 4 5 1 2 3 1 1 1 2 3 4 5 1 2 3 a1[sort(c(which(c(diff(a1)<0,TRUE)), which(a1[-length(a1)] == a1[-1])))] #[1] 5 3 1 1 5 3 a2<-c(1:2,rep(1,4),1:7,1:3) a2 # [1] 1 2 1 1 1 1 1 2 3 4 5 6 7 1 2 3  a2[sort(c(which(c(diff(a2)<0,TRUE)),

Re: [R] Package unpacks (successfully and MD5 sums checked" but will not load "not a valid package"

2013-05-28 Thread Berend Hasselman
On 28-05-2013, at 22:41, dbertin wrote: >> utils:::menuInstallLocal() > package ‘surv2sample’ successfully unpacked and MD5 sums checked >> library(surv2sample) > Error in library(surv2sample) : > ‘surv2sample’ is not a valid installed package > > Furthermore, if I go through "Packages->Load

[R] A question with respect to capturing output from a shell command

2013-05-28 Thread brwin338
Good Evening I have a set of fortran code that prints results to the screen when executed from the dos shell under windows. I want to capture the screen output directly into R when the code is executed via a shell command. I find that we can do this when the code is compiled with Lahey's 32

Re: [R] make stat.desc output an object

2013-05-28 Thread Berend Hasselman
On 28-05-2013, at 19:31, bcrombie wrote: > How do I assign a variable to R output that is generated by default functions > such as: > stat.desc(mydata, basic=TRUE, desc=TRUE, norm=FALSE, p=0.90) > summary(mydata) > Another way to put it: how can I turn an R function result into an object? >

Re: [R] p values of plor

2013-05-28 Thread meng
How to get p values from the result then? At 2013-05-28 13:54:27,"David Winsemius" wrote: > >On May 27, 2013, at 7:59 PM, meng wrote: > >> Hi all: >> As to the polr {MASS} function, how to find out p values of every >> parameter? >> >> >>> From the example of R help: >> house.plr <- polr

[R] Obtaing the maximum

2013-05-28 Thread Trying To learn again
Hi all, I have a series whose tpe for that is like series I expose below. The thing is if a incremental number ends I´m in the first "type" of event in this success is named 5 (because of the maximum is 5). In the series I have this kind of events 5,3,1,1,5,3 But I don´t know extactly a priori w

[R] make stat.desc output an object

2013-05-28 Thread bcrombie
How do I assign a variable to R output that is generated by default functions such as: stat.desc(mydata, basic=TRUE, desc=TRUE, norm=FALSE, p=0.90) summary(mydata) Another way to put it: how can I turn an R function result into an object? -- View this message in context: http://r.789695.n4.n

[R] highlight points in lattice cloud plot

2013-05-28 Thread sluedtke
Dear list, I am struggling with the following problem. In a 2d case I managed to highlight a subset of points through the panel.xyplot function. However, I was trying the same in 3d using panel.cloud, but now luck. I attached a minimal example, I think the first plot shows the idea. Tha

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Mark Breman
Thanks everyone for the suggestions. If the problem is caused by a restriction in one of the (software) components i'm using (OS, terminal etc), should the remaining of the pasted code simply be missing after the point where the error occurs? As can be seen from my example above the entire block o

[R] Package unpacks (successfully and MD5 sums checked" but will not load "not a valid package"

2013-05-28 Thread dbertin
> utils:::menuInstallLocal() package ‘surv2sample’ successfully unpacked and MD5 sums checked > library(surv2sample) Error in library(surv2sample) : ‘surv2sample’ is not a valid installed package Furthermore, if I go through "Packages->Load package" from the top bar surv2sample isn't in the lis

Re: [R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Júlia Zara
Dear Marcus and Rui, Thanks for answering my email. Even though the Portuguese/Spanish distinction may not happen, I think the dictrionary serach would get rid of most words I do not want to include in my research. I have never done this kind of research, but I will read something about it. Best

Re: [R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Marcus Nunes
I'm Brazilian I don't know a function like this either, but I can think of a problem using dictionary search. How can this search, if it exists, can distinguish between "espada", in Portuguese, and "espada", in Spanish? I know they have the same meaning in both languages, but it may cause some pr

[R] Download data

2013-05-28 Thread jcrosbie
Hi, I'm trying to download data from: http://www.ngx.com/settlehistory.html Is it possible to fetch the data with R? Thank you -- View this message in context: http://r.789695.n4.nabble.com/Download-data-tp4668138.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Discrete simulated annealing

2013-05-28 Thread Marcus Nunes
Hello all I'm trying to use simulated annealing to optimize a function. I know I can use ?optim with method="SANN" to do it. However, I'd like to make optim to search for the best solution among a set of possible points in my domain, and not informing a lower and an upper bound to the optmization

Re: [R] Question about subsetting S4 object in ROCR

2013-05-28 Thread Elizabeth McKenzie
You can access the data directly by using something like perf@x.values[[1]]. Not sure if that helps you. The package pROC allows you to do partial areas under the curve by selecting a range of specificity or sensitivity that you're interested in. On Tue, May 28, 2013 at 2:17 AM, Guido Leoni wrot

Re: [R] p values of plor

2013-05-28 Thread David Winsemius
On May 27, 2013, at 11:05 PM, Prof Brian Ripley wrote: > On 28/05/2013 06:54, David Winsemius wrote: >> >> On May 27, 2013, at 7:59 PM, meng wrote: >> >>> Hi all: >>> As to the polr {MASS} function, how to find out p values of every >>> parameter? >>> >>> From the example of R help: >>>

Re: [R] Function for finding matching values in two vectors.

2013-05-28 Thread C W
How about ?intersect > a<-1:5;b<-1:9 > a [1] 1 2 3 4 5 > b [1] 1 2 3 4 5 6 7 8 9 > intersect(a, b) [1] 1 2 3 4 5 I haven't used this in simulation, so I don't know how fast it is. -Mike On Tue, May 28, 2013 at 2:05 PM, arun wrote: > Hi, > You could use: > which(a%in%b) > #[1] 1 2 3 4 5 > > a1<-

[R] Rcpp Starter With Carry Class

2013-05-28 Thread ivo welch
I read Hadley's excellent Rcpp tutorial at https://github.com/hadley/devtools/wiki/Rcpp. Alas, there is one part that is missing---how do I maintain a memory region between calls? Here is a stylized example of what I mean: extern "C" { #include #include } #include class silly { double *v; i

Re: [R] Function for finding matching values in two vectors.

2013-05-28 Thread arun
Hi, You could use: which(a%in%b) #[1] 1 2 3 4 5 a1<-c(1,2,5) b1<-c(1,3,4,5,7) which(a1%in%b1) #[1] 1 3 A.K. Hello! I created the following function for calculating which elements in vector a are existant in vector b. However, all I get is NA NA NA and I can´t figure out why. =/ fun <- fu

[R] error in installation

2013-05-28 Thread Hui Du
Hi All, We have tried to install R in AIX. But it seems the installation is not complete because when we run R, we always get an error message like R Error in objects(i, all.names = TRUE) : failed to open ICU collator And if we want to install a new package, we get > install.packages Error: o

Re: [R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Barry Rowlingson
On Tue, May 28, 2013 at 5:02 PM, Rui Barradas wrote: > Hello, > > And some words exist in Portuguese, Spanish and English, the three > languages of the problem. For instance, "animal". I don't think this > problem can be solved, but a dictionary search would tell if it is a > Portuguese word, whic

Re: [R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Rui Barradas
Hello, And some words exist in Portuguese, Spanish and English, the three languages of the problem. For instance, "animal". I don't think this problem can be solved, but a dictionary search would tell if it is a Portuguese word, which it is. Rui Barradas Em 28-05-2013 16:17, Marcus Nunes es

[R] The weak exogeneity test in R for the Error Correction Model?

2013-05-28 Thread Yuan, Rebecca
Hello all, I would like to carry out a single-equation approach of the Error Correction Model such as Delta_y(t) = a + b*y(t-1) + c*x1(t-1) + d*x2(t-1) + e*delta_x1(t) + f*delta_x2(t) + epsilon(t) Where, a, b, c, d, e, f are coefficients to be estimated, y is the dependent variable, and x1, x

Re: [R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Rui Barradas
Hello, I'm portuguese and I don't know of any such function. Maybe a dictionary based search? Rui Barradas Em 28-05-2013 11:31, Júlia Zara escreveu: Hello everyone, I´ve been using R in my doctoral reserach and would really appreciate it if any of you could help me find a solution for a pro

Re: [R] choose the lines

2013-05-28 Thread arun
HI GG, Try this: dat2<- fun1(dat.bru) res1<-aggregate(basdai_d~patient_id+evnmt_brutal,data=dat2,mean) res11<-res1[order(res1$patient_id),] row.names(res11)<- 1:nrow(res11) head(res11,10) #   patient_id evnmt_brutal   basdai_d #1   2    0  0.900 #2   2    1 -0.8

Re: [R] metaMDS with large dataset produces 'insufficient data' warning

2013-05-28 Thread Jari Oksanen
Raeanne Miller sams.ac.uk> writes: > > Greetings everyone, > > I am running MDS on a very large dataset (12 x 25071 - 12 model runs with 25071 output values each), and also on a > very much reduced version of the dataset (randomly select 1000 of the 25071 output values). I would like to > look

[R] Help retrieving only Portuguese words from a file

2013-05-28 Thread Júlia Zara
Hello everyone, I´ve been using R in my doctoral reserach and would really appreciate it if any of you could help me find a solution for a problem. I have a file with texts in 3 languages - Portuguese, Spanish, and English - but I am interested only in the Portuguese words. Is there a function I

[R] reference for variance in svykm

2013-05-28 Thread Paola Rebora
Dear all, I am using the "svykm" function (in the survey package) to estimate survival in a two-phase study. I would like to know if there is any published reference for the estimator of the variance of survival curve under general sampling in order to cite it? The code uses the linea

[R] Failed exec in Update problem in R

2013-05-28 Thread Solomon M Pushparaj
Hi All, i try to use sqlSave() in R. i receive the following error. [RODBC] Failed exec in Update 22018 0 [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification for the below code. > library("RODBC") > dbConnection CreditCardVista sqlSave(dbConnection, >

[R] Inhomogeneous, univariate, O-Ring Statistic

2013-05-28 Thread J Ely
I wish to analyse an inhomogeneous and univariate point data pattern in R, using the O-Ring statistic described here by Wiegand and Moloney (2004) http://www.oesa.ufz.de/towi/towi_programita.html#ring My query therefore differs to https://stat.ethz.ch/pipermail/r-help/2005-December/084280.html who

Re: [R] How sum all possible combinations of rows, given 4 matrices

2013-05-28 Thread Estigarribia, Bruno
Thank you, Arun, I'll try it and let the list know if it works so the thread can be closed. I haven't worked in R for several years so I am really rusty. FYI, for people interested in why I want to do this, I am trying to calculate all the possible outcomes of applying the model below to a bilingua

Re: [R] lazy loading like object

2013-05-28 Thread Matteo Mattiuzzi
Dear Prof Ripley, thanks for your answer, >>> Prof Brian Ripley 05/28/13 11:07 AM >>> 1) This is a topic for the R-devel list. Ok so I will post it to that list (if save() does not properly work). 2) It sounds like something which should be done at installation, and can easily be done via top-

Re: [R] Trouble with arguments to 'order'

2013-05-28 Thread Barry King
Thank you for your assistance. I went with Peter's solution. All is working well now. - Barry On Tue, May 28, 2013 at 4:12 AM, Patrick Burns wrote: > If I understand your problem correctly, > you want to use '[[' instead of '$': > > order(parameters[["ItemColumn"**]], parameters[["PriceColumn"

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Prof Brian Ripley
On 28/05/2013 10:44, Jim Lemon wrote: On 05/28/2013 04:54 PM, Mark Breman wrote: Hello List, When i paste a large block of R code from an editor to the R command line the execution of the code will often fail at some point because it is not pasted as it was copied. ... Hi Mark, I have encount

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Spencer Graves
On 5/28/2013 2:44 AM, Jim Lemon wrote: > On 05/28/2013 04:54 PM, Mark Breman wrote: >> Hello List, >> >> When i paste a large block of R code from an editor to the R command >> line >> the execution of the code will often fail at some point because it is >> not >> pasted as it was copied. >> ...

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Jim Lemon
On 05/28/2013 04:54 PM, Mark Breman wrote: Hello List, When i paste a large block of R code from an editor to the R command line the execution of the code will often fail at some point because it is not pasted as it was copied. ... Hi Mark, I have encountered this problem, and it may be due to

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Enrico Schumann
On Tue, 28 May 2013, Enrico Schumann writes: > On Tue, 28 May 2013, Mark Breman writes: > >> Hello List, >> >> When i paste a large block of R code from an editor to the R command line >> the execution of the code will often fail at some point because it is not >> pasted as it was copied. >> >>

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Enrico Schumann
On Tue, 28 May 2013, Mark Breman writes: > Hello List, > > When i paste a large block of R code from an editor to the R command line > the execution of the code will often fail at some point because it is not > pasted as it was copied. > > =

Re: [R] lazy loading like object

2013-05-28 Thread Prof Brian Ripley
1) This is a topic for the R-devel list. 2) It sounds like something which should be done at installation, and can easily be done via top-level code in your R files. 3) We have no idea what 'gdal-bin' is, nor how that can be a 'library'. But save()-d R objects are portable unless something l

Re: [R] Trouble with arguments to 'order'

2013-05-28 Thread Patrick Burns
If I understand your problem correctly, you want to use '[[' instead of '$': order(parameters[["ItemColumn"]], parameters[["PriceColumn"]]) On 28/05/2013 07:06, Barry King wrote: I have an Excel worksheet with 20 rows. Using XLConnect I successfully read the data into 'indata'. In order to

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Barry Rowlingson
On Tue, May 28, 2013 at 7:54 AM, Mark Breman wrote: > Hello List, > > When i paste a large block of R code from an editor to the R command line > the execution of the code will often fail at some point because it is not > pasted as it was copied. This reminds me of the Tommy Cooper joke (I can't

Re: [R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Pascal Oettli
Hello, Yes, I do. I just copy and paste smallest blocks, easiest to debug. Regards, Pascal On 28/05/2013 15:54, Mark Breman wrote: Hello List, When i paste a large block of R code from an editor to the R command line the execution of the code will often fail at some point because it is not p

[R] Execution of larger blocks of pasted code often fails?

2013-05-28 Thread Mark Breman
Hello List, When i paste a large block of R code from an editor to the R command line the execution of the code will often fail at some point because it is not pasted as it was copied. === Example: I copied the following block of code (

[R] lazy loading like object

2013-05-28 Thread Matteo Mattiuzzi
Dear List, I'm writing the package MODIS (currently on R-forge), I lazy load some data which is a very elegant solution. These lazy loaded objects are typically used inside functions, most of that objects are not directly used by users. One of the objects I want to lazy load (is a result of a

Re: [R] Question about subsetting S4 object in ROCR

2013-05-28 Thread Guido Leoni
Ye sorry of course i'm interested to the area ranging from 0;0 to 0.4;0.8 thank you Guido 2013/5/27 Uwe Ligges > > > On 27.05.2013 16:18, Guido Leoni wrote: > >> Dear list >> I'm testing a predictor and I produced nice performance plots with ROCR >> package utilizing the 3 standard command >> >