[R] Version 1.3.5 of apcluster package

2014-06-30 Thread Ulrich Bodenhofer
Dear colleagues, This is to inform you that Version 1.3.5 of the R package apclusterhas been released on CRAN last Friday. This version is a quick fix of a larger update (Version 1.3.4) that was released one day earlier. The update to Version 1.3.4 included several internal and user-visible

[R] Time series

2014-06-30 Thread So
Hi There! I have a time series data for 13 years with freqency of 23 per year. I have plot the curve on R. Is it possible to refer to the point inbetween the nodes... eg. say the time series ts1 has ts1[1] 0.25 and ts1[2]=0.4. is it possible to get the time when ts1 reach to 0.3?? -- View this

Re: [R] Time series

2014-06-30 Thread PIKAL Petr
Hi Not much to cook from. Maybe ?approx Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of So Sent: Monday, June 30, 2014 7:05 AM To: r-help@r-project.org Subject: [R] Time series Hi There! I have a time

Re: [R] Change database in SQL Server using RODBC

2014-06-30 Thread Peter Crowther
On 30 June 2014 02:44, Ira Sharenow irasharenow...@yahoo.com wrote: I wish to query tables that are NOT in the default SQL Server 2012 database. Now for the problem. I also want to read in the table dbo.sports. That table is in the database sportsDB. I did not see any way to do so from within

[R] How to document an S3 class?

2014-06-30 Thread Witold E Wolski
Hi, How do I document an S3 class with roxygen2? I create the class at the end of the method with: class(res) - myclass but how do I create an documentation entry for this class, where I can describe the fields of the class (in case of myclass these are just list entries)? regards --

[R] perform a double poisson in R

2014-06-30 Thread Roberta Marino
Good morning, for my data I've perform a Quasi-Poisson distribution and now I want to perform a Double Poisson distribution Could someone tell me if it is possible and how do it in R I attach below my data Tanks for help, best regards Roberta Marino intdata-

[R] Population growthrate with Euler-Lotka

2014-06-30 Thread Mark Christjani
Hi everybody, I`m Mark and I do my PhD in biology. I try using R to calculate a population growth rate of animals grown on different types of food. Our workgroup has a R-skript to do so, but sadly nobody, who knows how this works. I`ve never used R before, but got some stuff

[R] getPairListElement()

2014-06-30 Thread Greg Minshall
hi. Writing R Extensions provides a simple routine getListElement(), said to be based on a similar routine in the package stats, for C code to call to find a named element of a list . however, it doesn't work for the argument list passed to a .External(), as that is a PairList rather than a

[R] x,y scatterplots, with averaging by a column

2014-06-30 Thread Tim Richter-Heitmann
Hallo! I have this matrix: SampleID, Day, Species1, Species2,Species3,...,Speciesn 1,Monday,abundance values 2,Monday,abundance values 11,Tuesday,abundance values 12,Tuesday,abundance values 21,Wednesday,abundance values 22,Wednesday,abundance values I would like to plot the Days on the

Re: [R] From long to wide format

2014-06-30 Thread arun
Hi Jorge, You may try: library(dplyr) library(tidyr) #Looks like this is faster than the other methods. system.time({wide1 - x2%%         select(-rate) %%         mutate(variable=factor(variable, levels=unique(variable)),id=factor(id, levels=unique(id))) %%     

[R] convergence warning in betamix()

2014-06-30 Thread ChrisR
Hi, I am running some rather complex mixtures of beta regressions using the betamix() command from the betareg package (V. 3.0-4). If I am doing exploratory regressions with only one random starting value (nstart=1) I obtain results which converge after about 100 iterations. However, if I run

Re: [R] merge question

2014-06-30 Thread Dr Eberhard W Lisse
Rolf, I hear you. But, after reflection, ie I looked at my situation again, it is great :-)-O el Sent from Dr Lisse's iPad mini On Jun 30, 2014, at 0:48, Rolf Turner r.tur...@auckland.ac.nz wrote: On 30/06/14 10:32, Dr Eberhard W Lisse wrote: Thanks, I then set NA to 0, and can

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread Simon Blomberg
Your script is failing at the first hurdle because you data are not being imported properly. You should include header=TRUE. sep=; In the call to read.table. Cheers. Simon. Sent from my iPhone Sent from my iPhone On 30 Jun 2014, at 7:10 pm, Mark Christjani m_christj...@gmx.de wrote:

[R] solving pde with given boundary condition (heat equation)

2014-06-30 Thread Zé Miguel
Dear R-helpers, I have 3 thermometers measuring soil temperature at 3 levels every 10 minutes. I want to determine the soil diffusivity, by solving the heat equation. The heat equation is a partial differential equation. In my case, the initial values are know and the boundary conditions are

Re: [R] x,y scatterplots, with averaging by a column

2014-06-30 Thread Jim Lemon
On Mon, 30 Jun 2014 10:42:28 AM Tim Richter-Heitmann wrote: Hallo! I have this matrix: SampleID, Day, Species1, Species2,Species3,...,Speciesn 1,Monday,abundance values 2,Monday,abundance values 11,Tuesday,abundance values 12,Tuesday,abundance values 21,Wednesday,abundance values

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread Simon Blomberg
Hmm. Try setting extendInt=yes in the call to uniroot. You should also look at the help page for uniroot. help(uniroot) May give you a clue. It's difficult for me to debug code on my iphone. Well, more difficult than usual. Best, Simon. Sent from my iPhone On 30 Jun 2014, at 8:53 pm, Mark

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread David Stevens
Mark - good on you for jumping into R with both feet. In addition to Simon's advice, the error message you are getting means that the two endpoints (r.range in your case) do not give function values that are of the opposite sign and so either the function has no roots on the interval or has

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread Simon Blomberg
There may be something wrong with your data: in all but one case you have lx=1 and mx=0. Uniroot may be having difficulty because of this. Simon. Sent from my iPhone On 30 Jun 2014, at 9:09 pm, Simon Blomberg s.blombe...@uq.edu.au wrote: Hmm. Try setting extendInt=yes in the call to

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread Mark Christjani
Thank you, Simon, for your input. Data import works fine now, but the final equation still won`t work. Console reads now: setwd(c:/Mark) table - read.table(r-TCO-Scene-Kontrolle.csv, header=TRUE, sep=;) table x lx mx 1 1 1.0 0.0 2 2 1.0 0.0 3

Re: [R] standard error of survfit.coxph()

2014-06-30 Thread Therneau, Terry M., Ph.D.
1. The computations behind the scenes produce the variance of the cumulative hazard. This is true for both an ordinary Kaplan-Meier and a Cox model. Transformations to other scales are done using simple Taylor series. H = cumulative hazard = log(S); S=survival var(H) = var(log(S)) = the

[R] yet another regular expression

2014-06-30 Thread Jim Lemon
Hi all, I have managed, with the help of glob2rx() to get two parts of a text manipulation working. I have successfully gotten rid of the first and second bits, but I have hit the wall trying to get rid of the last bit. Here's an example: initString- \Delete this\:value1,\Delete this

Re: [R] Population growthrate with Euler-Lotka

2014-06-30 Thread Mark Christjani
Thank you Simon and David for your suggestions. They were most helpful. The Skript is now working as it was originally planed. Greetings Mark Gesendet: Montag, 30. Juni 2014 um 13:06 Uhr Von: Simon Blomberg s.blombe...@uq.edu.au An: Mark Christjani m_christj...@gmx.de

Re: [R] regular expression help

2014-06-30 Thread C Lin
Hi, Bill Thank you so much for your kind explanation. It's very clear too for someone like me. I should've remember this but somehow forgot that [] have a special meaning in regular expression. Lin From: wdun...@tibco.com Date: Sun, 29 Jun 2014

Re: [R] yet another regular expression

2014-06-30 Thread Duncan Mackay
Hi Jim What about trying to use what you want to keep m=gregexpr('\\:value[12]+[}]?,', initString) regmatches(initString, m) [[1]] [1] \:value1, \:value2}, Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England Armidale NSW 2351 Email: home:

Re: [R] yet another regular expression

2014-06-30 Thread Jeff Newmiller
If everything Regular Expressions could do could be done with globbing then RE would likely not exist. I have interpreted your problem as: Start at the beginning of the string (^) match stuff that is not a colon ([^:]) match a colon (:') keep stuff that is not a comma (([^,]*)) match a comma

Re: [R] Change database in SQL Server using RODBC

2014-06-30 Thread Ira Sharenow
Thanks for everyone’s feedback. library(RODBC) con = odbcConnect(SQLServer2012) orders1 = sqlFetch(con,dbo.orders) odbcClose(con) Allowed me to close the connection properly. Thanks. However, I still cannot figure out how to connect to the second database and table. library(RODBC) con2

Re: [R] Change database in SQL Server using RODBC

2014-06-30 Thread Jeff Newmiller
Please post here using the plain text option in your email software because the HTML is not coming through undamaged. The first argument to the odbcConnect function is never SQL syntax... for SQL Server it is always a Data Source Name (DSN) that has been predefined in the ODBC administration

Re: [R] Change database in SQL Server using RODBC

2014-06-30 Thread Frede Aakmann Tøgersen
Hi I can see that you do have troubles understanding how all this works using the RODBC package. Peter wasn't really being helpful to you. This is something that is quite difficult to help with not sitting beside you. Do you not having some local help from e.g. the IT department? However for

Re: [R] A Question about read.table and Data Frames in R

2014-06-30 Thread David L Carlson
You are also missing the fact that loops are often not required in R. In this case print() has a method for printing data frames and that method is automatically used when you simply type the data.frame name or if you explicitly call it with print(stockList): stockList -

[R] Delaunay triangles with LONG/LAT + biomass

2014-06-30 Thread Trevor Davies
Hello, I was hoping someone could point me in the direction towards a package where I can use delaunay triangulation to create a polygon set where the inside of the triangles are tagged with an estimate of a mean value of the points making up the points of the triangle. This is fisheries trawl

[R] How to plot individual pdf files for each wrapped plot with ggplot2?

2014-06-30 Thread Bea GD
Hi, I'm working with tips data from reshape package. library(reshape2) I'm saving my plots as pdf and I was wondering whether it was possible to print a different pdf for each 'wrapped' plot. Using the code below as an example, I'd like to get 8 independent pdf files for each sex ~ day

Re: [R] mixing grid and traditional graphics

2014-06-30 Thread Greg Snow
If you really want to mix base and grid graphics (they don't play nicely together as you have noticed) then you should really use the gridBase package. There is at least one package for doing maps using grid (ggmap or ggMaps or something similar) and there is the regular text function for adding

Re: [R] How to plot individual pdf files for each wrapped plot with ggplot2?

2014-06-30 Thread Trevor Davies
I think the easiest most straight forward way would be to just throw it into a loop and subset the data on each loop around (untested code below but I'm sure you get the gist). ~Trevor sex1-unique(tips$sex) day1-unique(tips$day) for (i in 1:length(sex1)){ for (j in 1:length(day1)){

Re: [R] standard error of survfit.coxph()

2014-06-30 Thread array chip
Thank you Terry for the explanation! John From: Therneau, Terry M., Ph.D. thern...@mayo.edu Sent: Monday, June 30, 2014 6:04 AM Subject: Re: standard error of survfit.coxph() 1. The computations behind the scenes produce the variance of the cumulative

Re: [R] mixing grid and traditional graphics

2014-06-30 Thread Spencer Graves
Hi, Greg: Thanks. Just what I asked. Spencer On 6/30/2014 10:24 AM, Greg Snow wrote: If you really want to mix base and grid graphics (they don't play nicely together as you have noticed) then you should really use the gridBase package. There is at least one package for doing maps using

Re: [R] Delaunay triangles with LONG/LAT + biomass

2014-06-30 Thread MacQueen, Don
One place to start would be the Spatial task view on CRAN. The other would be to ask on R-sig-geo, where people who specialize in spatial data hang out. Delaunay triangulation is available in several packages. A simple search for delaunay on the CRAN packages page will easily find at least one.

Re: [R] yet another regular expression

2014-06-30 Thread arun
Hi Jim, May be this helps: library(stringr) paste(str_extract_all(initString, perl('(?=\\:)[[:alnum:]]+,?'))[[1]],collapse=) #[1] value1,value2 A.K. On Monday, June 30, 2014 9:58 AM, Jim Lemon j...@bitwrit.com.au wrote: Hi all, I have managed, with the help of glob2rx() to get two parts of a

[R] matrix

2014-06-30 Thread IZHAK shabsogh
kindly guide me on how i can delete and replace an element from a matrix t below for example delete first element in column one and replace it with 50, third element in column 2 by 90 and fifth element in column 3 by 100 t1-c(1,2,3,4,5) t2-c(6,7,8,9,10) t3-c(11,12,13,14,15) t-cbind(t1,t2,t3)

[R] How to combine/join/merge etc PCA and Cluster?

2014-06-30 Thread Jackson Rodrigues
Hello everybody, I Would like to get some help to plot together, Principal Components Analysis (PCA) and clusters. I am handling environmental data from 25 locations spread across 5 different ecosystems.When grouped into 5 clusters, locations from different ecosystems are arranged in the same

[R] R Console Output

2014-06-30 Thread Cheryl Johnson
When I run code in R, my R console output stops before all the code has complied. There are no error messages, but there must be an error somewhere. Thanks in advance for any guidance. [[alternative HTML version deleted]] __

Re: [R] matrix

2014-06-30 Thread Adams, Jean
t[1, 1] - 50 t[3, 2] - 90 t[5, 3] - 100 Jean On Mon, Jun 30, 2014 at 10:27 AM, IZHAK shabsogh ishaqb...@yahoo.com wrote: kindly guide me on how i can delete and replace an element from a matrix t below for example delete first element in column one and replace it with 50, third element

Re: [R] R Console Output

2014-06-30 Thread jim holtman
What do you mean by stops? Can you at least show what was on the console. Can you continue to enter commands? It is not clear what you are talking about. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it.

Re: [R] How to combine/join/merge etc PCA and Cluster?

2014-06-30 Thread David L Carlson
This is a long way from being a reproducible example with no data. You also don't mention that you are using package vegan. I'll use the dune, dune.env data included in that package: library(vegan) mydata.pca - rda(dune) mydata.w - hclust(dist(dune), ward) plot(mydata.w, hang=-1)

Re: [R] How to combine/join/merge etc PCA and Cluster?

2014-06-30 Thread David L Carlson
Insert data(dune) data(dune.env) after library(vegan) David C. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David L Carlson Sent: Monday, June 30, 2014 4:47 PM To: Jackson Rodrigues; r-help@r-project.org Subject: Re: [R] How

Re: [R] Delaunay triangles with LONG/LAT + biomass

2014-06-30 Thread Rolf Turner
On 01/07/14 04:31, Trevor Davies wrote: Hello, I was hoping someone could point me in the direction towards a package where I can use delaunay triangulation to create a polygon set where the inside of the triangles are tagged with an estimate of a mean value of the points making up the points

[R] Getting data from Table in RStudio

2014-06-30 Thread Shanae Clarke
Hello, I am new to R progaming and have just started using this program since last week. What i want to achieve is to use R to determine patterns in sales/ customer complaint etc. information located in a mysql database. I am not sure how to approach this or which technique i should use to do

Re: [R] yet another regular expression

2014-06-30 Thread Jim Lemon
On Mon, 30 Jun 2014 11:13:18 PM Jim Lemon wrote: Hi all, I have managed, with the help of glob2rx() to get two parts of a text manipulation working. I have successfully gotten rid of the first and second bits, but I have hit the wall trying to get rid of the last bit. Here's an example:

Re: [R] Getting data from Table in RStudio

2014-06-30 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Shanae Clarke Sent: Monday, June 30, 2014 1:58 PM To: r-help@r-project.org Subject: [R] Getting data from Table in RStudio Hello, I am new to R progaming and have just

Re: [R] From long to wide format

2014-06-30 Thread Jorge I Velez
Hi Arun, Thank you very much for your suggestion. While running some tests, I came across the following: # sample data n - 2000 p - 1000 x2 - data.frame(variable = rep(paste0('x', 1:p), each = n), id = rep(paste0('p', 1:p), n), outcome = sample(0:2, n*p, TRUE), rate = runif(n*p, 0.5, 1))

[R] Must array methods be defined for user defined classes?

2014-06-30 Thread Dan Murphy
Here's a simple example: setClass(foo, contains=numeric) x - new(foo, 4) # Division by scalar works x / 2 An object of class foo [1] 2 # Division by array blows up y - array(2, c(2, 2)) x / y Error in getDataPart(c(2, 2, 2, 2)) : node stack overflow # Not sure I understand the error message,

[R-es] Super indice en la etiqueta de los ejes de un grafico

2014-06-30 Thread neo
Estimados, como puedo poner un super indice en la etiqueta de los ejes de un grafico hecho con lattice ?? tengo que poner. Specific growth rate (d-1) y el -1 debe ir como superindice, no he podido encontrar esto. Gracias, eric. -- Forest Engineer Master in Environmental and Natural

Re: [R-es] superindice en la etiqueta de los graficos con lattice

2014-06-30 Thread daniel
Con un ejemplo siempre se entiende mejor, algo como lo que sigue es lo que buscas? datos - data.frame( x = rnorm(25), y = rnorm(25)) library(lattice) xyplot(datos$x ~ datos$y, xlab= expression(Specific Growth Rate (d^-1)), ylab= expression(y [+1])) Espero te