Re: [R] Help required with png graphic production as text has shadows?

2010-04-13 Thread Karl Ove Hufthammer
Alice Johnstone wrote: I have produced a series of graphs with the png command, however when I have finally printed these out the black text appears to have a colour shadow with blue or red on either side of the letter. What you’re seeing is likely subpixel antialiasing. How to ‘fix’ this

Re: [R] zerinfl() vs. Stata's zinb

2010-04-13 Thread Achim Zeileis
On Mon, 12 Apr 2010, David Fortunato wrote: Hello, I am working with zero inflated models for a current project and I am getting wildly different results from R's zeroinfl(y ~ x, dist=negbin) command and Stata's zinb command. Does anyone know why this may be? I find it odd considering that

Re: [R] glmer with non integer weights

2010-04-13 Thread ONKELINX, Thierry
Dear Kay, There is a R list about mixed models. Which is a better place for your questions. The (quasi)binomial family is used with binary data or a ratio that originates from binary data. In case of a ratio you need to provide the number of trials through the weights argument. Further I would

[R] problems on JGR package and demo() function in Ubuntu linux

2010-04-13 Thread Mao Jianfeng
Dear R-helpers I want to express my respect and thankfulness to all of you. An apology to the second post of this query. I have ever asked this question yesterday. Following Mr. Henrik Bengtsson's advice I re-submit this query here. I just switch from windows xp to Ubuntu linux platform. I am

[R] Merging list object

2010-04-13 Thread Ron_M
Hi, I have created following list object : library(zoo) dat - vector(list) for (i in 1:4) dat[[i]] - zooreg(rnorm(i*10), start=as.Date(2000-01-01), frequency=1) dat[[1]] 2000-01-01 2000-01-02 2000-01-03 2000-01-04 2000-01-05 2000-01-06 2000-01-07 2000-01-08 2000-01-09 2000-01-10

Re: [R] Figures within tables [slightly off-topic]

2010-04-13 Thread Jim Lemon
On 04/13/2010 06:07 AM, Peter Jepsen wrote: Dear R-listers I am writing a manuscript for a scientific journal in clinical medicine. I have three groups of patients, and I present a 10*3 table of their characteristics in Table 1. Some of their characteristics, e.g. their age, are on a

[R] R documentation

2010-04-13 Thread sophie bouchet
Dear all, I was used to see an htlm documentation when writing the command lines ?plot help.search(plot) The configuration was changed on my computer and help appears now as a R console window, without link with internet. Where can I change the configuration to connect with the html help?

[R] kruskal-wallis, stratified

2010-04-13 Thread Kay Cichini
hello everyone, can anybody tell me if there is a kruskal-wallis, or another non-parametric test, that can deal with multiple samples that are stratified? thanks, kay -- View this message in context: http://n4.nabble.com/kruskal-wallis-stratified-tp1838210p1838210.html Sent from the R help

Re: [R] kruskal-wallis, stratified

2010-04-13 Thread Heinz Tuechler
See the thread stratified Wilcoxon available? at http://tolstoy.newcastle.edu.au/R/help/05/08/11143.html Heinz At 11:21 13.04.2010, Kay Cichini wrote: hello everyone, can anybody tell me if there is a kruskal-wallis, or another non-parametric test, that can deal with multiple samples that

Re: [R] SSH Through R Script

2010-04-13 Thread Jonathan Baron
Another way to solve the problem is to mount the remote server using sshfs and then access it as a directory on your local computer. This will require using the password once when you mount the server, but you can just leave it mounted until you shut down your computer. E.g., You have an empty

Re: [R] How to run Shapiro-Wilk test for each grouped

2010-04-13 Thread Yvonnick Noel
Iurie, Noel, thanks a lot. This will help me someday. But I have a question. When we run Shapiro-Wilk test, the homogenity of variances is a mandatory condition? No it is not. An homoscedasticity test only makes sense when you have a grouping factor, and a normality test may of course be

Re: [R] Merging list object

2010-04-13 Thread Gabor Grothendieck
There is no facility to pass additional arguments to your function in Reduce. See ?Reduce zoo's merge function can merge multiple series. You don't need Reduce. Any of these three should work: library(zoo) dat - vector(list) for (i in 1:4) dat[[i]] - zooreg(rnorm(i*10),

[R] lines - graphics

2010-04-13 Thread Gustave Lefou
Dear R users, I have two vectors : x and y. x takes negative values and y positive ones. I write : plot(x) lines(y) However because y takes positive values, I cannot see y. What can I do ? Thank you very much, Gustave [[alternative HTML version deleted]]

Re: [R] kruskal-wallis, stratifiedhttp://n4.nabble.com/forum/NewNode.jtp?tpl=replynode=1838232

2010-04-13 Thread Kay Cichini
hello heinz, i read the thread already. i think it applies only to 2-sample problems. greatings, kay -- View this message in context: http://n4.nabble.com/kruskal-wallis-stratified-tp1838210p1838261.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] lines - graphics

2010-04-13 Thread jim holtman
plot(x, ylim=range(c(x,y)), xlim=c(0,max(c(length(x),length(y might work. On Tue, Apr 13, 2010 at 7:19 AM, Gustave Lefou gustave5...@gmail.comwrote: Dear R users, I have two vectors : x and y. x takes negative values and y positive ones. I write : plot(x) lines(y) However

Re: [R] glmer with non integer weights

2010-04-13 Thread Kay Cichini
thanks thierry, my problem is that the index is a propability which is not derived from incidents per nr. of observations, thus i don't have those numbers but only the plain index, which i want to test. greatings, kay -- View this message in context:

Re: [R] Figures within tables [slightly off-topic]

2010-04-13 Thread Ted Harding
On 13-Apr-10 09:54:20, Jim Lemon wrote: On 04/13/2010 06:07 AM, Peter Jepsen wrote: Dear R-listers I am writing a manuscript for a scientific journal in clinical medicine. I have three groups of patients, and I present a 10*3 table of their characteristics in Table 1. Some of their

[R] transpose but different

2010-04-13 Thread Duijvesteijn, Naomi
Hi all, I want to make extra columns in my datafile where the id of every groupmember is mentioned in separate columns. To explain it better see the example: id-c(1,2,3,4,5,6,7,8,9,10,11,12) group-c(1,1,1,1,2,2,3,3,3,3,3,3) a-as.data.frame(cbind(id,group)) a

Re: [R] glmer with non integer weights

2010-04-13 Thread ONKELINX, Thierry
So your respons variable behaves like a continuous variable except that is range is limited to the 0-1 interval. In such a case I would transform the respons variable (e.g. logit, sqrt(arcsin())) and use a gaussian model. HTH, Thierry

Re: [R] lines - graphics

2010-04-13 Thread Gustave Lefou
Thanks Mario and Jim 2010/4/13 jim holtman jholt...@gmail.com plot(x, ylim=range(c(x,y)), xlim=c(0,max(c(length(x),length(y might work. On Tue, Apr 13, 2010 at 7:19 AM, Gustave Lefou gustave5...@gmail.comwrote: Dear R users, I have two vectors : x and y. x takes negative values

[R] Using object.size inside a function

2010-04-13 Thread Bos, Roger
When I encounter memory errors, I like to see the size of the objects in memory, so I modified one of the examples: z - sapply(ls(), function(x) object.size(get(x))) as.matrix(rev(sort(z))[1:10]) This works fine if I run it as is, but if I try to place it inside a function, I get an

[R] standard errors, graphical representation of glmer

2010-04-13 Thread Kay Cichini
hi, i did a binomial glmer for a repeated measure design. now i wanted to use some indicator of variance for the fixed eff. of the model for the graphical representations. sd's of the plain incident rates are huge and misleading in that context. thus i thought of extracting se's of the

Re: [R] source(,echo=T) doesn't echo final comments

2010-04-13 Thread Duncan Murdoch
On 12/04/2010 7:14 PM, Kuhn, Alexandre (NIH/NIA/IRP) [V] wrote: Hi, source(file,echo=T) will not echo the last comment in file if it is the last line in the file. For instance, when sourcing a file containing the following lines #comment 1 a-1 #comment 2 R will echo #comment 1 a-1 What

Re: [R] transpose but different

2010-04-13 Thread jim holtman
try this: x - read.table(textConnection( id group + 1 1 1 + 2 2 1 + 3 3 1 + 4 4 1 + 5 5 2 + 6 6 2 + 7 7 3 + 8 8 3 + 9 9 3 + 10 10 3 + 11 11 3 + 12 12 3), header=TRUE) # split by group and process

Re: [R] Binning Question

2010-04-13 Thread David Winsemius
On Apr 13, 2010, at 12:02 AM, Noah Silverman wrote: David, That helps me a lot. Thanks!!! -N On 4/12/10 9:06 PM, David Winsemius wrote: dat - as.data.frame(matrix( rnorm(200), 100 , 2)) # bivariate normal n=100 ab - matrix( c(-5,-5,5,5), 2, 2) # interval [-5,5) x [-5,5) nbin - c( 20,

[R] vegan (ordisurf): R² for smoothed surf aces

2010-04-13 Thread Kim Vanselow
Dear r-helpers, I just read in an article by Virtanen et al. (2006) where vegetation-environment relationships are studied by fitting smoothed surfaces on an NMDS ordination using GAMs (Wood 2000). The authors describe, that they used R² as goodness-of-fit statistic, which they compare to the

Re: [R] R documentation

2010-04-13 Thread Duncan Murdoch
On 13/04/2010 4:58 AM, sophie bouchet wrote: Dear all, I was used to see an htlm documentation when writing the command lines ?plot help.search(plot) The configuration was changed on my computer and help appears now as a R console window, without link with internet. Where can I change the

[R] lapply - function with arguments

2010-04-13 Thread Randall Wrong
Dear R users, I have created a function f of n, a and b : f(n,a,b) I would like to apply this function several times to some values of n. a and b are held constant. I was thinking of using lapply. How can I do this ? Thank you very much Randall [[alternative HTML version deleted]]

Re: [R] problems on JGR package and demo() function in Ubuntu linux

2010-04-13 Thread David Winsemius
On Apr 13, 2010, at 3:31 AM, Mao Jianfeng wrote: Dear R-helpers I want to express my respect and thankfulness to all of you. An apology to the second post of this query. I have ever asked this question yesterday. Following Mr. Henrik Bengtsson's advice I re-submit this query here. I just

Re: [R] Using object.size inside a function

2010-04-13 Thread Duncan Murdoch
On 13/04/2010 8:43 AM, Bos, Roger wrote: When I encounter memory errors, I like to see the size of the objects in memory, so I modified one of the examples: z - sapply(ls(), function(x) object.size(get(x))) as.matrix(rev(sort(z))[1:10]) This works fine if I run it as is, but if I try

Re: [R] transpose but different

2010-04-13 Thread Gabor Grothendieck
Try this. First we use outer to form a matrix such that i,j-th entry is TRUE if i, j are in the same group and unequal and FALSE otherwise. We apply which on the rows of that matrix to get the groups that are associated with the row group. We then cbind the components together using ts class to

Re: [R] lapply - function with arguments

2010-04-13 Thread jim holtman
lapply(yourList, f, a=1, b=2) On Tue, Apr 13, 2010 at 9:11 AM, Randall Wrong randall.wr...@gmail.comwrote: Dear R users, I have created a function f of n, a and b : f(n,a,b) I would like to apply this function several times to some values of n. a and b are held constant. I was thinking of

Re: [R] kruskal-wallis, stratifiedhttp://n4.nabble.com/forum/NewNode.jtp?tpl=replynode=1838232

2010-04-13 Thread Heinz Tuechler
Sorry for not being precise enough. Here http://tolstoy.newcastle.edu.au/R/help/05/08/11177.html you should find the attachment http://tolstoy.newcastle.edu.au/R/help/att-11177/KW.strat.2005.R I used it, and it seems to work. In some cases some elements of weight may become Inf. Heinz At

Re: [R] Help required with png graphic production as text has shadows?

2010-04-13 Thread Greg Snow
Are you resizing the graphs at all? This can cause the shadows/blur, it is best to create the graphs at the exact size that you will end up using them so that there is no resizing (though I would not trust word to not resize even if you tell it not to). You may also want to try producing wmf

[R] - how/when/why do you use it?

2010-04-13 Thread Tal Galili
Hi all, Today I came across scoping in the R introhttp://cran.r-project.org/doc/manuals/R-intro.html#Scope (after reading Robert Gentleman fortunehttp://rfortunes.posterous.com/im-always-thrilled-when-people-discover-what on lexical scooping) , and am very curious about the - assignment. The

Re: [R] lapply - function with arguments

2010-04-13 Thread Randall Wrong
Thank you Jim 2010/4/13 jim holtman jholt...@gmail.com lapply(yourList, f, a=1, b=2) On Tue, Apr 13, 2010 at 9:11 AM, Randall Wrong randall.wr...@gmail.comwrote: Dear R users, I have created a function f of n, a and b : f(n,a,b) I would like to apply this function several times to

[R] Scales and bwplots

2010-04-13 Thread James Rome
I would like to make a series of bwplots with scales that are the same on each plot. x is hours of the day, so I chose hrs = seq(0, 24, 4) hrlabs = c(0,4,8,12,16,20,) g = bwplot((gdf$tt)~gdf$OnHour | gdf$Runway, data=gdf, ylab=Taxi time (min),

[R] Generating model formulas for all k-way terms

2010-04-13 Thread Michael Friendly
For the vcdExtra package, I'm exploring methods to generate and fit collections of glm models, and handling lists of such model objects, of class glmlist. The simplest example is fitting all k-way models, from k=0 (null model) to the model with the highest-order interaction. I'm having

[R] problem solved!

2010-04-13 Thread satu
Dear Uwe Ligges, Douglas and Romain, You were right. After changing to test.dl it worked. After doing that I re run the example provided in the inline package and worked well. It seems to me that the problem was that: 1) in the enviroment variables the path didn´t have the \bin folders of R

[R] Coloring leaves in Dendrogram according to gene names

2010-04-13 Thread PQuery
Hello, I am a new R user and have a question regarding dendrogram coloring. I would like to color each leaf in the dendrogram (dhc) according to a specific criterion. For me this criterion is the gene name. For this, I created a data.frame with 2 variables: The gene name and the corresponding

[R] Inline Package: void vs return type functions

2010-04-13 Thread satu
Dear all, After having a look at the inline package and also going through the Rcpp package which is tighty related to it, it came to me this question: 1) my C/ C++ code has a return type (let say a double[][] or a user define class) 2) I am working with an extensive library built by someone

[R] replace cells with column number

2010-04-13 Thread burgundy
Hello, I'm trying to replace cells with value 1 with the number of the column. Example below. Thank you! from: 0,1,0,1 0,0,0,1 1,0,0,1 to: 0,2,0,4 0,0,0,4 1,0,0,4 -- View this message in context: http://n4.nabble.com/replace-cells-with-column-number-tp1838289p1838289.html Sent from the R

[R] exract Shrinkage intensity lambda and lambda.var

2010-04-13 Thread KZ
does anyone know how to extract Shrinkage intensity lambda and lambda.var values after run cov.shrink(x)? thanks, KZ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] replace cells with column number

2010-04-13 Thread Dimitris Rizopoulos
supposing that these data are in a matrix, try this: # you original data M - rbind(c(0,1,0,1), c(0,0,0,1), c(1,0,0,1)) V - M # we make a copy... V[V == 1] - col(V)[V == 1] V I hope it helps. Best, Dimitris On 4/13/2010 2:07 PM, burgundy wrote: Hello, I'm trying to replace cells with

[R] renaming factors *efficiently*

2010-04-13 Thread Federico Calboli
Hi All, I have a data frame where a couple of columns are factors, with long and complex names. Everything works ok --in R, but I need to export the data so it can be used on a dumber program (one with a three letters name starting with S...). I know that those complex factor names are causing

Re: [R] renaming factors *efficiently*

2010-04-13 Thread Dimitris Rizopoulos
maybe ?abbreviate() could help. Best, Dimitris On 4/13/2010 4:18 PM, Federico Calboli wrote: Hi All, I have a data frame where a couple of columns are factors, with long and complex names. Everything works ok --in R, but I need to export the data so it can be used on a dumber program (one

Re: [R] - how/when/why do you use it?

2010-04-13 Thread Duncan Murdoch
On 13/04/2010 10:02 AM, Tal Galili wrote: Hi all, Today I came across scoping in the R introhttp://cran.r-project.org/doc/manuals/R-intro.html#Scope (after reading Robert Gentleman fortunehttp://rfortunes.posterous.com/im-always-thrilled-when-people-discover-what on lexical scooping) , and am

Re: [R] lapply - function with arguments

2010-04-13 Thread Arun.stat
another thought possibly fn = function(n, a=1, b=3) return(n*(a+b)) sapply(1:3, fn) -- View this message in context: http://n4.nabble.com/lapply-function-with-arguments-tp1838373p1838506.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] renaming factors *efficiently*

2010-04-13 Thread ONKELINX, Thierry
for(i in colnames(dummy)){ levels(dummy[, i]) - abbreviate(levels(dummy[, i])) } HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie Kwaliteitszorg Gaverstraat 4 9500

Re: [R] svm of e1071 package

2010-04-13 Thread Shyamasree Saha [shs]
Dear Steve, We have finally managed to run our code. Sparse matrix is helping a lot (I should say without matrix.csr, we would not be able to do it). This time it is taking very small amount of memory while running svm, but we could not use as.matrix.csr directly on our huge data. we had to

[R] raise a matrix to a power

2010-04-13 Thread li li
Hi all, I know the operator %*% can do matrix multiplication. Is there a function in R that can raise a matrix to a power? Hannah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Generating model formulas for all k-way terms

2010-04-13 Thread Joshua Wiley
Kway - function(formula, family, data, ..., order=nt) { models - list() mod - glm(formula, family, data, ...) terms - terms(formula) tl - attr(terms, term.labels) nt - length(tl) models[[1]] - mod for(i in 2:order) { models[[i]] - update(mod, .~.^i) } # null model

[R] Master Thesis - R

2010-04-13 Thread Andre
Hello, I would like to do a dissertation related to the R-Project. This will be the final work that I have to do to finish my master degree in Information Management. Essentially I would like to present a work with the principal functionalities of R and perhaps I could also do a development of

[R] sensitivity analysis, input factors

2010-04-13 Thread Szalai Márk
Hi, I'm trying to conduct sensitivity analysis in R using the 'sensitivity' package. Although the description of functions seem straightforward, I can’t succeed. The definition of input factors can be the problem. library(sensitivity) #A simple model with 4 input factor to test the morris

Re: [R] sensitivity analysis, input factors

2010-04-13 Thread milton ruser
Hi Szalai I had used only src function, and on that case you need to have a vector with your Y variable, and a data-frame with all your X (i.e. explanatory) variables. I have interest on stay in touch with others that have been using sensitivity package! bests milton On Tue, Apr 13, 2010 at

Re: [R] How to run Shapiro-Wilk test for each grouped

2010-04-13 Thread Thomas Lumley
On Tue, 13 Apr 2010, Yvonnick Noel wrote: Iurie, Noel, thanks a lot. This will help me someday. But I have a question. When we run Shapiro-Wilk test, the homogenity of variances is a mandatory condition? No it is not. An homoscedasticity test only makes sense when you have a grouping

[R] how to work with big matrices and the ff-package?

2010-04-13 Thread Anne Skoeries
Hello everyone, I need to create and work with some big matrices that actually have somewhat over 2 million columns and 117 rows. To do some calculations on such big matrices R just needs too much memory for my PC (4GB installed). So I need a solution to work with large datasets. I'm trying

Re: [R] glmer with non integer weights

2010-04-13 Thread Thomas Lumley
On Tue, 13 Apr 2010, ONKELINX, Thierry wrote: So your respons variable behaves like a continuous variable except that is range is limited to the 0-1 interval. In such a case I would transform the respons variable (e.g. logit, sqrt(arcsin())) and use a gaussian model. A logit-Normal has

[R] [RPostgreSQL] Fails to load

2010-04-13 Thread james
Hi List, Running R 2.10.1 on a fresh install of Windows 7. I get the following error when loading the RPostgreSQL package. library(RPostgreSQL) Loading required package: DBI Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared library

Re: [R] Inline Package: void vs return type functions

2010-04-13 Thread Romain Francois
Le 13/04/10 15:46, satu a écrit : Dear all, After having a look at the inline package and also going through the Rcpp package which is tighty related to it, it came to me this question: no. 1) my C/ C++ code has a return type (let say a double[][] or a user define class) 2) I am working

Re: [R] Generating model formulas for all k-way terms

2010-04-13 Thread Heather Turner
Hi Michael, You need to substitute the value of i for the symbol i in your formula, i.e. update(mod, substitute(.~.^i, list(i = i))) So, with some other tidying up: Kway - function(formula, family, data, ..., order=nt) { models - list() mod - glm(formula, family, data, ...)

Re: [R] Inline Package: void vs return type functions

2010-04-13 Thread Dirk Eddelbuettel
On 13 April 2010 at 05:46, satu wrote: | Dear all, | | After having a look at the inline package and also going through the | Rcpp package which is tighty related to it, it came to me this question: | | 1) my C/ C++ code has a return type (let say a double[][] or a user define | class) It

[R] Wilks lamda and single discriminant function

2010-04-13 Thread Joël Meunier
Dear R-users, I'm wondering how to obtain Wilks-lambda values when discriminant analyses have only one discriminant function (i.e. 2 categories to discriminate between). The use of manova(predictions~groups, test=Wilks) asks for multiple response and the use of anova(lm(predictions~groups),

Re: [R] kruskal-wallis, stratifiedhttp://n4.nabble.com/forum/NewNode.jtp?tpl=replynode=1838232

2010-04-13 Thread Kay Cichini
hello heinz, my mistake, i thought this threads dealt only with tests for 2-level grouping factor. many thanks for the hint! kay -- View this message in context: http://n4.nabble.com/kruskal-wallis-stratified-tp1838210p1838666.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] sensitivity analysis, input factors

2010-04-13 Thread Szalai Márk
Hi Milton, Thanks for your rapid answer. As far as I know the src is a regression based method and can be separated from model evaluations. However, a screening method like Morris requires that the input factors of  latter model evaluations would be determined by the results of previous

Re: [R] Excel date to R format

2010-04-13 Thread Ken Takagi
One useful package is chron: example: library(chron) #convert excel time to date time format etime = 39965.0004549653 orig =chron(12/30/1899); # origin of excel time. date.time = orig + etime; substr(as.character(date.time), 2, 18) # as character without parentheses. HTH, Ken

Re: [R] (no subject)

2010-04-13 Thread Danai Katsande
I am trying to plot a smoothing spline to using the following code, and an error pops up: car - read.table(car.csv,sep=,,header=T) attach(car) names(car) [1] veh_value exposure clm numclaims claimcst0 veh_body [7] veh_age genderarea agecatX_OBSTAT_ plot(

[R] Variable selection with quadratic terms

2010-04-13 Thread Sophie Baillargeon
Hi, I am trying to do stepwise variable selection with the function step. I want to allow in the model all main effects, double interactions and quadratic terms. However, I would like to respect the hierarchy of the terms, i.e. a quadratic term can be added to the model only if the main effect

[R] Hmisc::summarize with a dataframe as input?

2010-04-13 Thread arnaud chozo
Hi all, I'm looking for a function with the same functionalities as Hmisc::summarize but accepting a dataframe as input (not just a vector or a matrix). I'd like to compute the correlation between two variables in my dataframe, grouped according to other variables in the same dataframe. For

Re: [R] Smoothing

2010-04-13 Thread Danai Katsande
I am trying to plot a smoothing spline to using the following code, and an error pops up: car - read.table(car.csv,sep=,,header=T) attach(car) names(car) [1] veh_value exposure clm numclaims claimcst0 veh_body [7] veh_age genderarea agecatX_OBSTAT_ plot(

Re: [R] raise a matrix to a power

2010-04-13 Thread li li
Thanks a lot! I found the funciton. Hannah 2010/4/13 Gustaf Rydevik gustaf.ryde...@gmail.com On Tue, Apr 13, 2010 at 4:58 PM, li li hannah@gmail.com wrote: Hi all, I know the operator %*% can do matrix multiplication. Is there a function in R that can raise a matrix to a power?

[R] Time series and non-integer seconds

2010-04-13 Thread Jeszenszky Péter
Hello, How to handle time series data if the sampling period is a fraction of a second? Classes such as POSIXct, chron and timeDate stores only integer second values. Although class POSIXlt suports fractions of a second, neither package zoo nor package xts handle POSIXlt date/time objects. Best

[R] stepwise regression-fitting all possible models

2010-04-13 Thread aspa
Dear All, I am new to R and I would like to do the following: I want to fit a logistic model with 3 predictors and then perform a stepwise regression to select the best possible model using either the AIC/BIC criterion. I have used the stepAIC function which works fine but using this method

[R] (no subject)

2010-04-13 Thread Amitoj Chopra
I like to get off the mailing list. thank you. Amitoj [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Converting a .txt file into a matrix

2010-04-13 Thread cobbler_squad
I need to convert foo.txt file into as.matrix .txt file is a single column of numbers (i.e. -0.303904 -0.889965 -0.0270313 -0.387125 0.189837 -0.14858 -0.651178 -0.162632 0.449309 ) and I need to find out the correct syntax to read in this table as.matrix I tried

[R] ccf problem (cross-correlation)

2010-04-13 Thread Andrea Picco
Hi all, I have a problem concerning my understanding of the cross-correlation (ccf) function in R. assume a time serie as: t-seq(0,6.28,by=0.01); my_serie-ts(sin(t),start=0,end=6.28,deltat=0.01) then I generate an other one shifted by 12 time points:

[R] SNPassoc

2010-04-13 Thread Euphoria
Hi guys! I am trying to run an interaction analysis between two SNPs using the SNPassoc package. I keep getting the following two errors: Error: switch Error: y value must be 0 =y = 1 Here is my code: myData -setupSNP (data=InterAll, colSNPs=10:11, sep=)

Re: [R] Time series and non-integer seconds

2010-04-13 Thread Dirk Eddelbuettel
On 13 April 2010 at 18:49, Jeszenszky Péter wrote: | Hello, | | How to handle time series data if the sampling period is a fraction of | a second? Classes such as POSIXct, chron and timeDate stores only integer | second values. Although class POSIXlt suports fractions of a second, | neither

Re: [R] Generating model formulas for all k-way terms

2010-04-13 Thread Michael Friendly
Beautiful! And thanks for the clean-up -Michael Heather Turner wrote: Hi Michael, You need to substitute the value of i for the symbol i in your formula, i.e. update(mod, substitute(.~.^i, list(i = i))) So, with some other tidying up: Kway - function(formula, family, data, ..., order=nt) {

[R] import file formatted RFC-822

2010-04-13 Thread Sebastian Kruk
Dear R-list users: I would like to import a database of web robots, http://www.robotstxt.org/db/all.txt, it´s formatted RFC-822, ¿how can I do it? The RFC 822 specification defines a standard format for electronic messages, which consists of a set of header fields and an optional body. The

Re: [R] import file formatted RFC-822

2010-04-13 Thread Barry Rowlingson
On Tue, Apr 13, 2010 at 6:26 PM, Sebastian Kruk residuo.so...@gmail.com wrote: Dear R-list users: I would like to import a database of web robots, http://www.robotstxt.org/db/all.txt, it´s formatted RFC-822, ¿how can I do it? RFC822 looks very much like R's package DESCRIPTION files, and

[R] Kennard-stone or other uniform subset sampling algorithm?

2010-04-13 Thread Woolner, Keith
Is there any package in R which performs something like the Kennard-Stone uniform mapping algorithm (a.k.a. uniform subset selection)? I've used Rseek.org to search the R-help archives and other resources, and found only the following two mentions.

[R] Revolutions blog: March Roundup

2010-04-13 Thread David M Smith
I write about R every weekday at the Revolutions blog: http://blog.revolution-computing.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. (Sorry this week's roundup is a little later than usual -- I've was preempted by last

Re: [R] Converting a .txt file into a matrix

2010-04-13 Thread Steve Lianoglou
Hi, On Tue, Apr 13, 2010 at 12:37 PM, cobbler_squad la.f...@gmail.com wrote: I need to convert foo.txt file into as.matrix .txt file is a single column of numbers (i.e. -0.303904 -0.889965 -0.0270313 -0.387125 0.189837 -0.14858 -0.651178 -0.162632 0.449309 ) and I need to find out

Re: [R] (no subject)

2010-04-13 Thread Steve Lianoglou
Hi, On Tue, Apr 13, 2010 at 11:35 AM, Danai Katsande daniekatsa...@gmail.com wrote: I am trying to plot a smoothing spline to using the following code, and an error pops up: car - read.table(car.csv,sep=,,header=T) attach(car) names(car)  [1] veh_value exposure  clm       numclaims

Re: [R] stepwise regression-fitting all possible models

2010-04-13 Thread Steve Lianoglou
Hi, On Tue, Apr 13, 2010 at 12:51 PM, aspa a.angelakopou...@gmail.com wrote: Dear All, I am new to R and I would like to do the following: I want to fit a logistic model with 3 predictors and then perform a stepwise regression to select the best possible model using either the AIC/BIC

Re: [R] Smoothing

2010-04-13 Thread David Winsemius
On Apr 13, 2010, at 10:58 AM, Danai Katsande wrote: I am trying to plot a smoothing spline to using the following code, and an error pops up: car - read.table(car.csv,sep=,,header=T) attach(car) names(car) [1] veh_value exposure clm numclaims claimcst0 veh_body [7] veh_age

[R] random effect prediction with $frail in survreg

2010-04-13 Thread Nicolas RODE
Dear R users, I'm trying to fit a survival model using the survreg function with a Weibull distribution. I'm using the frailty() function in order to fit a family random effect in my model. I would like to calculate the estimate for each observation and I know the predict() function doesn't work

Re: [R] source(,echo=T) doesn't echo final comments

2010-04-13 Thread Peter Ehlers
On 2010-04-13 6:50, Duncan Murdoch wrote: On 12/04/2010 7:14 PM, Kuhn, Alexandre (NIH/NIA/IRP) [V] wrote: Hi, source(file,echo=T) will not echo the last comment in file if it is the last line in the file. For instance, when sourcing a file containing the following lines #comment 1 a-1

[R] Network Analysis

2010-04-13 Thread bchaney
Hi, I am working on a project to understand the linkages between various websites. My data currently looks like the following: Variables: Website referral_site_1 referral_site_2 ... destination_site_1 destination_site_2 ... The values in these fields are just websites. So for every website in

[R] WinBUGS Question

2010-04-13 Thread Anamika Chaudhuri
Hi: Is there a way we can set up WINBUGS to run 100 simulated datasets on the same model and output results? Or do we have to call in each dataset at a time and repeat the process 100 times manually? Thanks Anamika [[alternative HTML version deleted]]

Re: [R] WinBUGS Question

2010-04-13 Thread Yihui Xie
If you are using R2WinBUGS, I guess you may put them in a loop like: # models ... data_i[j]~dnorm(...) ... # save them in a sequence of files with names like 'model_i.bug' # write.model() might help? # then call bugs() for(i in names.of.your.100.datasets){

[R] filled.contour ON TOP of a base map

2010-04-13 Thread Víctor Homar Santaner
Dear R helpers, Any suggestion on how to make the 2D gaussian to show up ON TOP of the map, instead of below the continents? Example code: library(mapdata) x-seq(-15,15,.2);y-seq(30,55,.2) expone-function(x,y){10*exp(-sqrt(x*x+(y-40)*(y-40))/2)} z-outer(x,y,expone)

[R] Simulation problem.

2010-04-13 Thread Piotr Arendarski
Hi, I have problem with simulating. This is my task... Suppose that there are N persons some of whom are sick with influenza. The following assumptions are made: * when a sick person meets a healthy one, the chance is á that the latter will be infected * all encounters are between two persons

[R] Help in gam() in MGCV

2010-04-13 Thread Chen, Jinsong (jc8ww)
Hello, We have a question about how to retrieve the nonparametric curve in gam() function. Now, we get the estimates and draw the fitted curve using the following code. You can see that our fitted curve is parallel to the output from gam() function but differs by a constant shift. However,

[R] writing function ( 'plot' and 'if') problem

2010-04-13 Thread casperyc
=== myf=function(ds=1){ x=rnorm(10) y=rnorm(10) { #start of if if (ds==1) { list(x,y) } else (ds==2) { plot(x,y) } } # end of if } # end of function === Hi All, the problem i am having here is, that I want to be able to control the display, lf

Re: [R] writing function ( 'plot' and 'if') problem

2010-04-13 Thread Peter Alspach
Tena koe Caspar Try removing the (ds==2) - I'm not sure how you expect R to interpret that. HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of casperyc Sent: Wednesday, 14 April 2010 10:42 a.m. To:

[R] liner regression for multiple keys

2010-04-13 Thread newbie_2010
a1 is the first key in input. second column is x-axis and 3rd is y-axis and 4th is its corresponding key. Now for every key in 1st column I would like to calculate LR that gives p value. I tried to manage with a single key. But my problem is that How could I manage multiple keys in input. Thanx

[R] dbFD computing distinct species wrong?

2010-04-13 Thread Sarah Berke
Hi everyone, I am working with the dbFD function of the FD package, and there's something funny happening with the value of sing.sp in the output. Basically, I have a species-function matrix and a community matrix. One site in particular has 6 species, 4 of which have identical functional

Re: [R] writing function ( 'plot' and 'if') problem

2010-04-13 Thread casperyc
what i am triyng to do is when ds=1 give me a list ds=2 plot Thanks casper -- View this message in context: http://n4.nabble.com/writing-function-plot-and-if-problem-tp1839091p1839125.html Sent from the R help mailing list archive at Nabble.com.

  1   2   >