Re: [R] How to make this for() loop memory efficient?

2012-01-11 Thread iliketurtles
Ray, your solution works and is indeed faster than mine! It looks like it's going to take a few days to to 400,000 rows, still, which is unfortunate. Steve, thanks for your help, I'll definitely self-teach plyr and data.table. - Isaac Research Assistant Quantitative Finance Faculty,

[R] R problem: unable to read data in the xls-format in the PerformAnalytics package

2012-01-11 Thread ysei...@bluewin.ch
Hallo I have the following problem 1) Problem: I am unable to read data in the xls-format in the PerformAnalytics package. While it works well for several commands, e.g. t(table.Stats(msci_ret)) it does not work for other commands, e.g. x - msci_ret[, c(CH), drop = FALSE] table.Drawdowns(x)

Re: [R] Fwd: Sum of a couple of variables of which a few have NA values

2012-01-11 Thread Ivan Calandra
Dear Petra, I think the easiest way, because the most flexible to me, would be to have an object containing the indexes of the variables you want to use. indx - c(2,3,4,6,35) # The first column is id right? dat$sums - rowSums(dat[indx], na.rm=TRUE) See what I mean? There are probably other

Re: [R] 64bit R under 32bit winxp

2012-01-11 Thread Jeff Newmiller
You cannot install 64-bit R on 32-bit OS, but you can install a 32-bit R on a 64-bit OS, and you can later install 64-bit R as well. That is, installing 32-bit R does not interfere with your option to later install a 64-bit R.

Re: [R] help

2012-01-11 Thread peter dalgaard
On Jan 11, 2012, at 02:37 , R. Michael Weylandt wrote: That sort of name is allowed but not advised because it can lead to confusion in certain non-standard evaluation functions like subset(). Standard evaluation too: data1$1G attach(data1) 1G Nowadays, backquoting (`1G`) solves the issue

[R] Reg : Capture.output not supporting UTF-8 data

2012-01-11 Thread Raji
Hi, I had generated PMML using rpart algorithm.The input had UTF-8 and the same had come in PMML. But when i tried to use capture.output on that pmml , it did not retain the UTF_8 encoding.We are using this PMML in our applicaition and we need to retain the UTF-8 characters. Any method where i

Re: [R] Vegan(ordistep) error: Error in if (aod[1, 5] = Pin) { : missing value where TRUE/FALSE needed

2012-01-11 Thread Jari Oksanen
Nevil Amos nevil.amos at monash.edu writes: I am getting the following erro rmessage in ordistep. I have a number of similarly structured datasets using ordistep in a loop, and the message only occurs for some of the datasets. I cannot include a reproducible sample - the specific

[R] problems with glht for ancova

2012-01-11 Thread gaiarrido
I've run an ancova, edadysexo is a factor with 3 levels,and log(lcc) is the covariate (continous variable) I get this results ancova-aov(log(peso)~edadysexo*log(lcc)) summary(ancova) Df Sum Sq Mean Sq F value Pr(F) edadysexo2 31.859 15.9294 803.9843 2e-16

[R] Plot maps with R

2012-01-11 Thread Alaios
Dear all I would like to use R and make some maps. I want to have strict control, over the details of the produced map, like remove borders, city names, add markers, add labels. Is there any package apart Rgooglemaps that can do something like that? B.R Alex [[alternative HTML version

[R] Max value of an integer

2012-01-11 Thread Rui Esteves
Hi. Is there any constant that represents the maximum value of an integer? If I need to setup by myself what is the maximum value? Best, Rui __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] runif with condition

2012-01-11 Thread peter dalgaard
On Jan 10, 2012, at 18:11 , AlanM wrote: I have to disagree with what's been posted, but I think some very interesting points have been addressed. I'd like to add my two cents. Consider the pair {X, 1-X} where X is sampled from a uniform(0,1) distribution. The quantity 1- X also comes

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread syrvn
Hi, thanks for your answer. Unfortunately I cannot reproduce your results. In my example the results still differ when I use your approach: x - c(10,11,15,8,16,12,20) y - c(10,14,18,25,28,30,35) f - as.factor(c(rep(a,7), rep(b,7))) d - c(x,y) kruskal.test(x,y) Kruskal-Wallis rank

Re: [R] problem installing packages

2012-01-11 Thread Uwe Ligges
On 10.01.2012 22:40, R. Michael Weylandt michael.weyla...@gmail.com wrote: What lists are you referring to when you state: there are many packages that do not show up in the list of binaries. They do in the list of sources? CRAN? To see all packages installed on your machine try

Re: [R] Max value of an integer

2012-01-11 Thread Berend Hasselman
rmx wrote Hi. Is there any constant that represents the maximum value of an integer? If I need to setup by myself what is the maximum value? ?.Machine i.e. .Machine$integer.max Berend -- View this message in context:

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread Łukasz Ręcławowicz
2012/1/11 syrvn ment...@gmx.net Hi, thanks for your answer. Unfortunately I cannot reproduce your results. In my example the results still differ when I use your approach: x - c(10,11,15,8,16,12,20) y - c(10,14,18,25,28,30,35) f - as.factor(c(rep(a,7), rep(b,7))) d - c(x,y)

Re: [R] 64bit R under 32bit winxp

2012-01-11 Thread Prof Brian Ripley
On 11/01/2012 08:55, Jeff Newmiller wrote: You cannot install 64-bit R on 32-bit OS, Technically, you can (but by default the packaged installers will refuse to do so). What you cannot do is run 64-bit R on a 32-bit version of Windows: the OS will refuse to run the executables (and if it is

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread Meyners, Michael
The devil is in the details (and in the arguments in Lukasz code). The defaults for the two functions are different: wilcox.test uses an exact test (which is not available in kruskal.test afaik) for your data, and uses the continuity correction if the normal approximation is requested (neither

[R] Constructing a data.frame from csv files

2012-01-11 Thread Vincy Pyne
Dear R helpers, Following is my R code where I am trying to calculate returns and then trying to create a data.frame. Since, I am not aware how many instruments I will be dealing so I have constructed a function. My R code is as follows - library(plyr) mydata - data.frame(instru_name =

Re: [R] Problem with segmented

2012-01-11 Thread Vito Muggeo (UniPa)
dear Phil, I am not able to read the error message.. did you forget it? However: does x exist in the workspace? The following lines work: myreg2 = lm(y ~ x, data=xy) mysegmented = segmented(myreg2, seg.Z=~x, psi=c(245000)) myreg2 = lm(xy$y ~ xy$x) x-xy$x mysegmented = segmented(myreg2,

Re: [R] runif with condition

2012-01-11 Thread Duncan Murdoch
On 12-01-11 5:12 AM, peter dalgaard wrote: On Jan 10, 2012, at 18:11 , AlanM wrote: I have to disagree with what's been posted, but I think some very interesting points have been addressed. I'd like to add my two cents. Consider the pair {X, 1-X} where X is sampled from a uniform(0,1)

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread syrvn
Hi Michael and Mi³ego dnia, yes right. I get identical results now! thanks a lot! -- View this message in context: http://r.789695.n4.nabble.com/2-sample-wilcox-test-kruskal-test-tp4282888p4285325.html Sent from the R help mailing list archive at Nabble.com.

[R] spplot : help with legend

2012-01-11 Thread Ana
Hi! I am looking for some examples on how to plot using spplot the overlay of :polygon+point+point both point files are different files with different coordinates. I am planning on doing something like this: polygon.file=readShapeSpatial(polygons) l1 = list(sp.points, points.file1, pch = 19,col

[R] get the percentage rank of a value based on an empirical data vector

2012-01-11 Thread Martin Batholdy
Hi, I have a vector with values: x - rnorm(1000, 5, 2) and one single value: y - 6.2 now I would like to know the percent rank of y based on the 'population'-vector x. Is there a convenient function that calculates the percent rank of a y for the given vector x? thanks!

Re: [R] Constructing a data.frame from csv files

2012-01-11 Thread jim holtman
The error message says it all: the dataframes that you are creating, and then trying to 'rbind', do not have the same columns. You need to at least show what the first couple of lines of each of you input files are, or output the names of the columns as you are reading the files. This is some

Re: [R] How to make this for() loop memory efficient?

2012-01-11 Thread Martin Morgan
On 01/11/2012 12:09 AM, iliketurtles wrote: Ray, your solution works and is indeed faster than mine! It looks like it's going to take a few days to to 400,000 rows, still, which is unfortunate. Steve, thanks for your help, I'll definitely self-teach plyr and data.table. I added a column with

Re: [R] get the percentage rank of a value based on an empirical data vector

2012-01-11 Thread David Winsemius
On Jan 11, 2012, at 8:12 AM, Martin Batholdy wrote: Hi, I have a vector with values: x - rnorm(1000, 5, 2) and one single value: y - 6.2 now I would like to know the percent rank of y based on the 'population'-vector x. Is there a convenient function that calculates the percent rank of

[R] Help with speed (replacing the loop?)

2012-01-11 Thread Dimitri Liakhovitski
Dear R-ers, I have a loop below that loops through my numeric variables in data frame x and through levels of the factor group and multiplies (group by group) the values of numeric variables in x by the corresponding group-specific values from data frame y. In reality, my: dim(x) is 300,000 rows

Re: [R] R problem: unable to read data in the xls-format in the PerformAnalytics package

2012-01-11 Thread Joshua Ulrich
On Wed, Jan 11, 2012 at 2:41 AM, ysei...@bluewin.ch ysei...@bluewin.ch wrote: Hallo I have the following problem 1) Problem: I am unable to read data in the xls-format in the PerformAnalytics package. While it works well for several commands, e.g. t(table.Stats(msci_ret)) it does not

Re: [R] get the percentage rank of a value based on an empirical data vector

2012-01-11 Thread R. Michael Weylandt michael.weyla...@gmail.com
If performance is an issue, I think mean(x y) will be as quick as it can be done in R alone (you could do it in C in a single pass if needed which might be a good first exercise in using compiled code) Michael On Jan 11, 2012, at 8:58 AM, David Winsemius dwinsem...@comcast.net wrote: On

[R] general question on Spotfire

2012-01-11 Thread John Smith
Dear R users, I have been using R for 10 years, and I love it very much. But in my daily job for drug discovery, some people use Spotfire. I tried Spotfire on couple of data sets. It sounds I still need do some data manipulation before plot figures. For example, I can not plot figure with data

Re: [R] Help with speed (replacing the loop?)

2012-01-11 Thread Steve Lianoglou
Hi, On Wed, Jan 11, 2012 at 9:57 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Dear R-ers, I have a loop below that loops through my numeric variables in data frame x and through levels of the factor group and multiplies (group by group) the values of numeric variables in x

Re: [R] general question on Spotfire

2012-01-11 Thread Duncan Murdoch
On 12-01-11 10:13 AM, John Smith wrote: Dear R users, I have been using R for 10 years, and I love it very much. But in my daily job for drug discovery, some people use Spotfire. I tried Spotfire on couple of data sets. It sounds I still need do some data manipulation before plot figures. For

Re: [R] plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series

2012-01-11 Thread Joshua Ulrich
Hi Ted, On Tue, Jan 10, 2012 at 1:59 PM, Ted Byers r.ted.by...@gmail.com wrote: R version 2.12.0, 64 bit on Windows. Here is a short script that illustrates the problem: library(tseries) library(xts) setwd('C:\\cygwin\\home\\Ted\\New.Task\\NKs-01-08-12\\NKs\\tests') x =

Re: [R] Help with speed (replacing the loop?)

2012-01-11 Thread Dimitri Liakhovitski
Thanks a lot, Steve. I have one question (below): library(data.table) ## your data xx - data.table(group=c(rep(group1,5),rep(group2,5)),                 a=1:10, b=seq(10,100,by=10), key=group) yy - data.table(group=c(group1,group2), a=c(10,20), b=c(2,3),                 key=group)

Re: [R] get the percentage rank of a value based on an empirical data vector

2012-01-11 Thread Martin Batholdy
findInterval(6.2, sort(x)) [1] 704 xecdf - ecdf(x) xecdf(6.2) [1] 0.704 thanks, that helped a lot! On 11.01.2012, at 14:58, David Winsemius wrote: On Jan 11, 2012, at 8:12 AM, Martin Batholdy wrote: Hi, I have a vector with values: x - rnorm(1000, 5, 2) and one

Re: [R] CairoPDF and greek letter spacing

2012-01-11 Thread Walker, John Stephen
Thanks for the input, but I can confirm the either form of the paste command i.e. expression(paste(Length (, mu*m, ))) or my original which had expression(paste(Length (, mu, m))), and the expression command alone have the same effect. It may be limited to Linux machines (which I did state I

Re: [R] general question on Spotfire

2012-01-11 Thread John Smith
I am struggling whether I should learn Spotfire or not. I just want some statisticians inputs. Thanks On Wed, Jan 11, 2012 at 10:28 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 12-01-11 10:13 AM, John Smith wrote: Dear R users, I have been using R for 10 years, and I love it very

[R] Generating unque patient IDs

2012-01-11 Thread Ayyappa Chaturvedula
Dear group, I am trying to prepare a NONMEM friendly dataset for population PK analysis. My patient IDs are 10 digit long and NONMEM is losing precison and rouding the last couple of digits. I need to generate unique Patient IDs fromt he current 10-digit IDs. Ihave total 250 subjects so I

Re: [R] Help with speed (replacing the loop?)

2012-01-11 Thread Steve Lianoglou
Hi, On Wed, Jan 11, 2012 at 10:50 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Thanks a lot, Steve. I have one question (below): library(data.table) ## your data xx - data.table(group=c(rep(group1,5),rep(group2,5)),                 a=1:10, b=seq(10,100,by=10),

Re: [R] general question on Spotfire

2012-01-11 Thread peter dalgaard
On Jan 11, 2012, at 16:28 , Duncan Murdoch wrote: On 12-01-11 10:13 AM, John Smith wrote: Dear R users, I have been using R for 10 years, and I love it very much. But in my daily job for drug discovery, some people use Spotfire. I tried Spotfire on couple of data sets. It sounds I still

Re: [R] Help with speed (replacing the loop?)

2012-01-11 Thread Jeff Newmiller
It is common that performance problems are addressed by using more memory. If your algorithm needs to join those tables and do calculations, then you can either pay the piper in memory (usually the most appropriate answer) or you can reinvent those optimized algorithms in a compiled language

[R] Odp: Generating unque patient IDs

2012-01-11 Thread Petr PIKAL
Hi Dear group, I am trying to prepare a NONMEM friendly dataset for population PK analysis. My patient IDs are 10 digit long and NONMEM is losing precison and rouding the last couple of digits. I need to generate unique Patient IDs fromt he current 10-digit IDs. Ihave total 250

[R] test for condition during whole r session or after each command

2012-01-11 Thread Jannis
Dear List, is there any way to test for certain conditions during the whole r session or after the execution of each command? I am debugging my code and sometimes a certain logical error causes a program error much later in the script/function so especially with loops etc it is hard to

Re: [R] Odp: Generating unque patient IDs

2012-01-11 Thread jim holtman
Does this do it for you: sprintf(%010.0f, seq(10.0, length = 250, by = 1.0)) [1] 10 11 12 13 14 15 16 [8] 17 18 19 100010 100011 100012 100013 [15] 100014 100015 100016

Re: [R] Generating unque patient IDs

2012-01-11 Thread David Winsemius
On Jan 11, 2012, at 11:12 AM, Ayyappa Chaturvedula wrote: Dear group, I am trying to prepare a NONMEM friendly dataset for population PK analysis. My patient IDs are 10 digit long and NONMEM is losing precison and rouding the last couple of digits. Are you sure? I need to generate

Re: [R] Help with speed (replacing the loop?)

2012-01-11 Thread Dimitri Liakhovitski
Thanks a lot, Steve! match sounds very promising - that means I only need a loop across predictors. As far as get more memory advice is concerned: I already have more memory :) On Wed, Jan 11, 2012 at 11:14 AM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Hi, On Wed, Jan 11, 2012 at

Re: [R] Odp: Generating unque patient IDs

2012-01-11 Thread David Winsemius
Unfortunately the rounding effect (which I assumed was related to the automatic conversion from integer to numeric) is only going to show up above 2147483647L, so I question whether you really demonstrated a solution to what I understood was the fundamental problem. -- David. On Jan 11,

[R] rgl/ x11 problem

2012-01-11 Thread jack hietpas
Hello- I am having problems with plot3d... I keep receiving the follow messages: when I attempt to load the package: library(rgl, pos=4), I get this error message: [6] WARNING: Warning in rgl.init(initValue) : Warning in rgl.init(initValue) : Warning in rgl.init(initValue) : Warning in

Re: [R] CairoPDF and greek letter spacing

2012-01-11 Thread Chris Campbell
As a workaround you could use escape characters, then adjust the font style as necessary. cairo_pdf(file = zend.pdf) print(xyplot(y ~ x, data = data.frame(x = 1:10, y = 1:10), main = Length (\u03BCm))) dev.off() Regards Chris Campbell MANGO SOLUTIONS Data Analysis that Delivers +44 1249

Re: [R] Odp: Generating unque patient IDs

2012-01-11 Thread jim holtman
One of the reasons that I specified the 'seq' command as it was was to make sure it used numerics: x - seq(123456789012.0, length = 10, by = 1.0) x [1] 123456789012 123456789013 123456789014 123456789015 123456789016 123456789017 123456789018 [8] 123456789019 123456789020 123456789021 str(x)

Re: [R] Odp: Generating unque patient IDs

2012-01-11 Thread Ayyappa Chaturvedula
Dear all, I am sorry if I misstated the problem. The roundig issue is with NONMEM software not with R. But the suggestions are helpful. Regards,Ayyappa Chaturvedula On Jan 11, 2012, at 12:14 PM, David Winsemius dwinsem...@comcast.net wrote: Unfortunately the rounding effect (which I

Re: [R] Generating unque patient IDs

2012-01-11 Thread Chris Campbell
Dear Ayyappa Unique identifiers can be created from numbers using factor. These are coded as integers in R which you could use to relabel your dataset. x - rep(16:18, each = 2) x [1] 16 16 17 17 18 18 y - factor(x) levels(y)

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of syrvn Sent: Tuesday, January 10, 2012 10:28 AM To: r-help@r-project.org Subject: [R] 2 sample wilcox.test != kruskal.test Hello, I think I am right in saying that a 2

Re: [R] general question on Spotfire

2012-01-11 Thread Bert Gunter
Peter et. al: 1. I agree with Duncan: wrong list. 2. AFAIK, Spotfire **already** can interface with R. -- Bert On Wed, Jan 11, 2012 at 8:17 AM, peter dalgaard pda...@gmail.com wrote: On Jan 11, 2012, at 16:28 , Duncan Murdoch wrote: On 12-01-11 10:13 AM, John Smith wrote: Dear R users,

Re: [R] stacked barplot colour coding

2012-01-11 Thread Jean V Adams
acacia21 wrote on 01/09/2012 07:01:28 PM: Hi all, i'm fairly new to R and its graphing, but having unsuccessfully 'googled' and checked this forum to find answer to my problem, i'm posting my question here. I'm trying to plot stacked barplot. I have simple data that looks like this: bg

Re: [R] general question on Spotfire

2012-01-11 Thread Louis Bajuk-Yorgan
Hello, I am a Product Manager at Spotfire, focused on integrating statistical capabilities from R S+ into Spotfire, so I will make a few comments: 1. We have a quite a few customers who use Spotfire and R side-by-side for doing ad hoc data analysis. Sometimes by the same user, sometimes by

Re: [R] Plot maps with R

2012-01-11 Thread hwright
Dear Alex Two other packages that create maps are: maps mapproj alaios wrote Dear all I would like to use R and make some maps. I want to have strict control, over the details of the produced map, like remove borders, city names, add markers, add labels. Is there any package apart

Re: [R] plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series

2012-01-11 Thread Ted Byers
Hi Joshua, Thanks. I had used irts because I thought I had to. The tick data I have has some minutes in which there is no data, and others when there are hundreds, or even thousands. If xts supports irregular data, the that is one less step for me to worry about. Alas, your suggestion didn't

[R] Assist me on how I can arrange trend data of rainfall and temperature for analysis

2012-01-11 Thread MukhalaC
I am a student doing my MSc Research Methods, i am working on my thesis research on analysing and modelling of crop failure risks due to drought in selected districts in Malawi. The analysis and modelling will focus on two crop stages of development: just after planting and flowering stages. I

[R] Accomplishing a loop on multiple columns

2012-01-11 Thread Nerak
Hello, I have a question concerning ‘for loops’ on multiple columns. I made 91 columns with results (all made together with a for loop) and I want to us lm to fit the model. I want to compare the results of all these calculated columns (91) with one column with observed values. I use the function

Re: [R] 64bit R under 32bit winxp

2012-01-11 Thread 孟欣
Thanks At 2012-01-11 16:55:32,Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: You cannot install 64-bit R on 32-bit OS, but you can install a 32-bit R on a 64-bit OS, and you can later install 64-bit R as well. That is, installing 32-bit R does not interfere with your option to later install

Re: [R] Max value of an integer

2012-01-11 Thread Mikko Korpela
On 01/11/2012 12:01 PM, Rui Esteves wrote: Is there any constant that represents the maximum value of an integer? Yes, there is (assuming you refer to the 'integer' type). See ?.Machine. .Machine$integer.max [1] 2147483647 as.integer(2147483647) [1] 2147483647 as.integer(2147483648) [1] NA

Re: [R] Getting Sphericity Tests for Within Subject Repeated Measure Anova (using car package)

2012-01-11 Thread maximilian.mueller
Dear John, thanks for your help and sorry for answering this late. My question is a follow up question of an older thread posted several mongths ago, but your statement helped a lot. Thanks, Max - M a x i m i l i a n M ue l l e r PhD-Student Department of Business Studies Leuphana

[R] Problem concerning withRestarts and R2WinBUGS

2012-01-11 Thread Jongerling, J. (Joran)
Dear R-users, I have a question regarding the withRestarts function in R. I´m running a simulation code in which I analyse data using both lme and R2WinBUGS. Now, I want to run this code for 1000 replications, however the model I´m using is a little ´sensitive´, so sometimes the WinBUGS

Re: [R] RGL- Drawing Circle

2012-01-11 Thread gli
thanks Duncan. I think want my circle to be in user coordinates. I tried the first code u gave me and it gives me a circle. but how can i: 1) change the radius ? 2) place the circle at a given x,y,z coordinate? 3) turn it 90 degree up like these circle plate bus stop?

Re: [R] Accomplishing a loop on multiple columns

2012-01-11 Thread iliketurtles
Lists are the answer. LIST-list() for(i in 1:ncol(results6)) { LIST[[i]]-lm(results6[,i]~data$observed) } You'll now have a 91 entry list of lm(). You can then do something like this: LIST2-list() for(i in 1:length(LIST)) { LIST2[[i]]-LIST[[i]]$r.squared } This should now be a list

Re: [R] odfWeave UTF-8 error and latin characters

2012-01-11 Thread staffan7s
Hello, I am using R and Libreoffice on Ubuntu 11.10 (64-bit) and have been experiencing similar problems with character encoding (Swedish utf8) in odfWeave. Here is an example of what it looks like: Should be: Hör Ärland dåligt? Appears as: Hör Ärland dÃ¥ligt? I found a (pretty clumsy)

Re: [R] Constructing a data.frame from csv files

2012-01-11 Thread Vincy Pyne
Dear Sir, Thanks a lot for your guidance. I have understood my mistake. It was naming the columns viz.   colnames(price_returns) = entity_returns which was creating the problems. Code is running excellently once I got rid of this particular line. I will use melt from reshape etc to get the

Re: [R] Problem with segmented

2012-01-11 Thread Filoche
Hi there. Here's the error message. Error in seg.lm.fit(y, XREG, Z, PSI, weights, offs, opz) : (Some) estimated psi out of its range I have tried many ways to specify the arguments, but apparently the error message is related to the estimated break point being invalid. However, my estimation

[R] New to R, Curious about Project Idea

2012-01-11 Thread arbeaupg
Good morning, I am a student whom is currently working on a term project for my GIS Program. I am looking for a software package which can aid me in my project, and I was curious if R would be able to address my goals. My project includes power outage data from a hydro company (point data, with

[R] meta-analysis normal quantile plot metafor

2012-01-11 Thread Ricc
Hello, I once used the metawin software to perform a meta-analysis (see metawinsoft, Rosenberg et al.) and produced normal qqplot to test for a potential bias in the dataset. I now want to re-use the same dataset with the package metafor by W. Viechtbauer (great package btw). I run the

Re: [R] fix and edit don't work: unable to open X Input Method-segfault

2012-01-11 Thread Patrick Connolly
On Sun, 08-Jan-2012 at 03:32PM -0600, Paul Johnson wrote: | I can't run fix() or edit() anymore. Did I break my system? | | I'm running Debian Linux with R-2.14.1. As far as I can tell, the R | packages came from Debian's testing wheezy repository. I would | like to know if users on other

Re: [R] rjags installation trouble

2012-01-11 Thread Martyn Plummer
It looks like you are cross-linking to an earlier version of the JAGS library at run time. Check /sbin/ldconfig -p | grep jags - When compiling rjags, you can hard-code the location of the jags library using the [GNU-specific] configure option --enable-rpath. Martyn On Tue, 2012-01-10 at 10:40

[R] turning a list of vectors into a data.frame (as rows of the DF)?

2012-01-11 Thread Chris Conner
As a newer R practicioner, it seems I stump myself weekly (at least) with issues that have spinning my wheels.  Here is yet another... I'm trying to turn a list of numeric vectors (of uneual length) inot a dataframe.  Each vector held in the list represents a row, and there are some rows of

Re: [R] general question on Spotfire

2012-01-11 Thread Spencer Graves
Roughly 5 years ago, a Spotfire rep at the Joint Statistical Meetings told me they routinely interfaced with both R and S-Plus. I'm not 100% certain, but I believe they have many customers who use that facility today. Spencer On 1/11/2012 10:37 AM, Bert Gunter wrote: Peter et. al: 1. I

[R] Confidence Interval from Moments?

2012-01-11 Thread lambdatau
Hi all, I'm wondering whether it is possible to construct a confidence interval using only the mean, variance, skewness and kurtosis, i.e. without any of the population? If anyone could help with this it'd be much appreciated (even if just a confirmation of it being impossible!). Thanks. --

[R] Getting a root edge error when trying to read the phylocom megatree into R

2012-01-11 Thread Megan Bartlett
Hi, I'm trying to use the picante package in R to build phylogenetic trees, based on a list of taxa I have data for and the phylocom APG3 megatree (version R20091110; http://www.phylodiversity.net/phylomatic/). However, trying to read the tree in R using: read.tree(R20091110.new.txt) Gives the

Re: [R] Restricting R session

2012-01-11 Thread Uwe Ligges
On 10.01.2012 20:30, Antonio Rodriges wrote: Hello, Is it possible to use R on public server where each user has its own restricted R session? This entirely depends on the definition of restricted, otherwise the answer is yes. In particular, how to prohibit some set of functions, for

[R] Storing/Restoring R objects

2012-01-11 Thread Rich Shepard
One of my projects has generated quite a few objects (data frames) related to one portion of this project. They can be listed with the ls() function. What I would like to do is move them to another directory so that data frames for other portions of the project can be more easily seen and

Re: [R] plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series

2012-01-11 Thread Joshua Ulrich
On Wed, Jan 11, 2012 at 11:10 AM, Ted Byers r.ted.by...@gmail.com wrote: Hi Joshua, Thanks. I had used irts because I thought I had to.  The tick data I have has some minutes in which there is no data, and others when there are hundreds, or even thousands.  If xts supports irregular data,

Re: [R] 2 sample wilcox.test != kruskal.test

2012-01-11 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of syrvn Sent: Wednesday, January 11, 2012 2:36 AM To: r-help@r-project.org Subject: Re: [R] 2 sample wilcox.test != kruskal.test Hi, thanks for your answer. Unfortunately I

[R] 2D filter in R?

2012-01-11 Thread Michael
Hi all, I am looking for a command for doing 2D filtering (rectangular or Gaussian) in R... I have looked at ksmooth, filter and convolve but they seem to be 1D... Any thoughts? Thanks a lot! [[alternative HTML version deleted]] __

Re: [R] Problem with segmented

2012-01-11 Thread Sarah Goslee
We really need the small reproducible example requested in the posting guide, including sample data, the actual R commands you used, the libraries required, and your OS and version of R. Sarah On Wed, Jan 11, 2012 at 9:08 AM, Filoche pmassico...@hotmail.com wrote: Hi there. Here's the error

Re: [R] stacked barplot colour coding

2012-01-11 Thread Richard M. Heiberger
This graph would be easier under lattice graphics. biomass - data.frame(bg=c(0.41, 0.37, 0.31, 0.32), ag=c(2.81, 2.91, 2.06, 2.39)) b2 - stack(biomass) names(b2) - c(mass, type) b2$type - factor(b2$type, levels=c(bg,ag)) b2$AB - rep(c(A,A,B,B), 2) b2$location - rep(1:4, 2)

Re: [R] New to R, Curious about Project Idea

2012-01-11 Thread R. Michael Weylandt
It sounds quite possible but you'll probably get more specialized help if you ask on the r-sig-geo mailing list. Michael On Wed, Jan 11, 2012 at 9:36 AM, arbeaupg parb...@gmail.com wrote: Good morning, I am a student whom is currently working on a term project for my GIS Program. I am

Re: [R] Restricting R session

2012-01-11 Thread Antonio Rodriges
Thank you, Uwe, below are my comments In particular, how to prohibit some set of functions, for example, from base package? You can't: R is free software. This does not imply it must be inflexible and unsuitable for cloud services Well, of course you could build your own version of R

Re: [R] turning a list of vectors into a data.frame (as rows of the DF)?

2012-01-11 Thread R. Michael Weylandt
Most methods take the rows of data.frame()s to be very significant (indicating multiple values from a single observation) so what you're doing seems like it may be against the spirit of R, but if you want a simple NA padding at the end, this should do it: listToDF - function(inputList, fill =

Re: [R] Storing/Restoring R objects

2012-01-11 Thread R. Michael Weylandt
R is the natural tool to operate on a .RData file: you can name it however you wish either with your OS or with the save() command in R. You can load any .RData files with the load() command but the startup routine only looks for .RData (to my knowledge) unless you put specific instructions in

Re: [R] Storing/Restoring R objects

2012-01-11 Thread Uwe Ligges
On 11.01.2012 20:56, Rich Shepard wrote: One of my projects has generated quite a few objects (data frames) related to one portion of this project. They can be listed with the ls() function. What I would like to do is move them to another directory so that data frames for other portions of the

Re: [R] RGL- Drawing Circle

2012-01-11 Thread Uwe Ligges
On 11.01.2012 15:08, gli wrote: thanks Duncan. I think want my circle to be in user coordinates. I tried the first code u gave me and it gives me a circle. but how can i: 1) change the radius ? 2) place the circle at a given x,y,z coordinate? 3) turn it 90 degree up like these circle

Re: [R] New to R, Curious about Project Idea

2012-01-11 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of arbeaupg Sent: Wednesday, January 11, 2012 6:36 AM To: r-help@r-project.org Subject: [R] New to R, Curious about Project Idea Good morning, I am a student whom is currently

[R] summarizing a complex dataframe

2012-01-11 Thread Christopher G Oakley
I need some help summarizing complex data frames (small example below): m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 i1111222 i1211222 i2221222 For an arbitrary number of columns (say m1 …. m199) where the column names

Re: [R] Confidence Interval from Moments?

2012-01-11 Thread R. Michael Weylandt
Assuming a distribution defined solely by those moments it is possible (e.g., z- or t-test confidence intervals) but this isn't really the place to discuss such things since there's no R content to your question: try stats.stackexchange.com Michael On Wed, Jan 11, 2012 at 4:56 AM, lambdatau

Re: [R] turning a list of vectors into a data.frame (as rows of the DF)?

2012-01-11 Thread William Dunlap
Perhaps the following does what you want. It extends each element of your list to a common length, converts that to a matrix, then to a data.frame: f - function(data) { nCol - max(vapply(data, length, 0)) data - lapply(data, function(row) c(row, rep(NA, nCol-length(row data -

Re: [R] turning a list of vectors into a data.frame (as rows of the DF)?

2012-01-11 Thread Marc Schwartz
On Jan 11, 2012, at 1:40 PM, Chris Conner wrote: As a newer R practicioner, it seems I stump myself weekly (at least) with issues that have spinning my wheels. Here is yet another... I'm trying to turn a list of numeric vectors (of uneual length) inot a dataframe. Each vector held in the

Re: [R] rjags installation trouble

2012-01-11 Thread Ben Bolker
On 12-01-11 11:45 AM, Martyn Plummer wrote: It looks like you are cross-linking to an earlier version of the JAGS library at run time. Check /sbin/ldconfig -p | grep jags - When compiling rjags, you can hard-code the location of the jags library using the [GNU-specific] configure option

Re: [R] Storing/Restoring R objects

2012-01-11 Thread Jeff Newmiller
?save ?load You may need to create single use environment objects to hold the whole file while you separate multiple objects. --- Jeff NewmillerThe . . Go Live...

[R] rjava on FreeBSD

2012-01-11 Thread Hasan Diwan
Trying to install Rjava on FreeBSD 9 and am getting the following error: install.packages('rJava') trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/rJava_0.9-3.tar.gz' Content type 'application/x-gzip' length 537153 bytes (524 Kb) opened URL ==

Re: [R] Storing/Restoring R objects

2012-01-11 Thread David Winsemius
On Jan 11, 2012, at 2:56 PM, Rich Shepard wrote: One of my projects has generated quite a few objects (data frames) related to one portion of this project. They can be listed with the ls() function. What I would like to do is move them to another directory so that data frames for other

Re: [R] summarizing a complex dataframe

2012-01-11 Thread Steve Lianoglou
Hi, On Wed, Jan 11, 2012 at 3:55 PM, Christopher G Oakley coak...@bio.fsu.edu wrote: I need some help summarizing complex data frames (small example below):    m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 i1    1    1    1    2    2    2 i1    2    1    1    2    2    2 i2    2    2    1    2    2    2

  1   2   >