Re: [R] p values of plor

2013-05-28 Thread Prof Brian Ripley
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: house.plr - polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)

[R] Trouble with arguments to 'order'

2013-05-28 Thread Barry King
I have an Excel worksheet with 20 rows. Using XLConnect I successfully read the data into 'indata'. In order to sort it on the 'Item' column and the 'Price_Per_Item' column I submit: index - with(indata, order(Item, Price_Per_Item)) sortedData - indata[index, ] The above works fine but now I

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

2013-05-28 Thread peter dalgaard
On May 28, 2013, at 08:06 , Barry King wrote: I have an Excel worksheet with 20 rows. Using XLConnect I successfully read the data into 'indata'. In order to sort it on the 'Item' column and the 'Price_Per_Item' column I submit: index - with(indata, order(Item, Price_Per_Item))

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 lig...@statistik.tu-dortmund.de 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

[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

[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

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

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 breman.m...@gmail.com 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

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

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

2013-05-28 Thread Enrico Schumann
On Tue, 28 May 2013, Mark Breman breman.m...@gmail.com 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, Enrico Schumann e...@enricoschumann.net writes: On Tue, 28 May 2013, Mark Breman breman.m...@gmail.com 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

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

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. ... Hi Mark, I

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

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 pbu...@pburns.seanet.comwrote: If I understand your problem correctly, you want to use '[[' instead of '$': order(parameters[[ItemColumn**]],

Re: [R] lazy loading like object

2013-05-28 Thread Matteo Mattiuzzi
Dear Prof Ripley, thanks for your answer, Prof Brian Ripley rip...@stats.ox.ac.uk 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

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

[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

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

[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

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

2013-05-28 Thread Jari Oksanen
Raeanne Miller Raeanne.Miller at 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

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

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

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

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

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 ruipbarra...@sapo.pt 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

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

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 -

[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 stdio.h #include math.h } #include new class silly {

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 smartpink...@yahoo.com wrote: Hi, You could use: which(a%in%b) #[1] 1 2 3

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: house.plr - polr(Sat ~ Infl

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

[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

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

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

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

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

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

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

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

[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

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 dwinsem...@comcast.net 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 -

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

2013-05-28 Thread Berend Hasselman
On 28-05-2013, at 19:31, bcrombie bcrom...@utk.edu 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

[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] 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 dber...@uoguelph.ca 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

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