Re: [R] integrate R code to WinEdt file

2006-11-23 Thread Uwe Ligges
Aimin Yan wrote: I want to integrate R code to my WinEdt file. Can someone tell me how to do this? I copy R code to my WinEdt file, but it does't work. I do not understand your question. Are you trying to install the RWinEdt package, which acts as a plug in for WinEdt to support writing R

Re: [R] Sweave question

2006-11-23 Thread Schweitzer, Markus
Hm, have you installed it correctly? latex usually returns error messages. On windows latex is quite difficult to handle. I guess you have to include a link to your sweave file: \usepackage{C:/Programme/R-2.3.1/share/texmf/Sweave} and also provide the package there. furthermore take care, that

[R] ARMAX Models in R

2006-11-23 Thread Katharina Vedovelli
Hi, I want to model different timeseries with ARMAX models in R because I think that ARMAX models will map best to these data. Besides I don't want to use the order of the AR or MA part but the lag e.g. AR Part =ar1, ar2, ar7; MA Part =ma1, ma3 and I want to use exogenous variables as well. I

[R] command option for R CMD BATCH

2006-11-23 Thread Patrick Connolly
I wish to use R CMD BATCH to run a small R function which reads a text file and plots a single graph to a PDF file. version _ platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu

Re: [R] ARMAX Models in R

2006-11-23 Thread Prof Brian Ripley
You can do this in arima() using arguments 'fixed' and 'xreg'. On Thu, 23 Nov 2006, Katharina Vedovelli wrote: Hi, I want to model different timeseries with ARMAX models in R because I think that ARMAX models will map best to these data. Besides I don't want to use the order of the AR or MA

Re: [R] What training algorithm does nnet package use?

2006-11-23 Thread Wee-Jin Goh
Hello, Thanks for that. I've taken a look at the source code, and I see that the bulk of the processing is done in C, with R acting as a wrapper. Below is the function I think is doing the training in the network. I'm guessing it's the standard Backpropagation with a decay term algorithm?

Re: [R] data in form of a date

2006-11-23 Thread Hans-Peter
Hi, 2006/11/22, James J. Roper [EMAIL PROTECTED]: I often use dates and times in analyses. I just can't figure out how to format my date or time column in R. So, apparently R sees the date as something other than date (character). Let's say I am opening a CSV file, one of the columns of

Re: [R] What training algorithm does nnet package use?

2006-11-23 Thread Gavin Simpson
On Thu, 2006-11-23 at 09:39 +, Wee-Jin Goh wrote: Hello, Thanks for that. I've taken a look at the source code, and I see that the bulk of the processing is done in C, with R acting as a wrapper. Below is the function I think is doing the training in the network. I'm guessing it's

[R] loess lines in xyplot with two or more variables on the left side of a formula

2006-11-23 Thread Chuck Cleland
Hello: I recall something like this being discuss recently, but I can't seem to locate an example in the archives. I have data like the following: df - expand.grid(1:4, 1992:2002) names(df) - c(MSA, YEAR) df$IDUPREV - runif(44) df$VALIDAT - rnorm(44) I want to create an xyplot() with

[R] writing character to a file in UTF-8

2006-11-23 Thread ronggui
Dear lister, I would like to now if there a universal way to writing a character vector to a file in UTF-8 encoding? By universal, I mean a way which works under Linux, Windows and Mac. Thanks in advance! -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China

[R] which() over a matrix

2006-11-23 Thread javier garcia-pintado
Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how could I use which (or another way) to obtain a vector that

[R] Using roman and italic fonts in an xlab expression for a plot

2006-11-23 Thread Philip Boland
Just wondering if it is possible to put something like The excess level is M in the xlab position of a plot but where the M is in italic font and the rest in ordinary (or Roman) font. Thanks - Phil Boland __ R-help@stat.math.ethz.ch mailing list

Re: [R] writing character to a file in UTF-8

2006-11-23 Thread Wee-Jin Goh
Hello, Have a look at the function iconv, which converts a character vector from one encoding to another. If you're not interested in converting from one encoding to another, and just want any character vector to be encoded as UTF-8, open the file in the following way, passing

Re: [R] which() over a matrix

2006-11-23 Thread Peter Dalgaard
javier garcia-pintado [EMAIL PROTECTED] writes: Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how

Re: [R] Using roman and italic fonts in an xlab expression for a plot

2006-11-23 Thread David Barron
Something like: xlab=expression(paste(The excess level is,italic( M))) in your plot command should do the trick. See ?plotmath. On 23/11/06, Philip Boland [EMAIL PROTECTED] wrote: Just wondering if it is possible to put something like The excess level is M in the xlab position of a plot

Re: [R] which() over a matrix

2006-11-23 Thread Chuck Cleland
javier garcia-pintado wrote: Hello, A brief question that I am not able to resolve by my own, but I presume it's easy for you: I've used apply to find the values closer to 0 in each row of a matrix: closer.to.0 - apply(abs(myarray),MARGIN=1,min) My question is how could I use which (or

Re: [R] loess lines in xyplot with two or more variables on the left side of a formula

2006-11-23 Thread Gabor Grothendieck
Try this: xyplot(IDUPREV + VALIDAT~ YEAR | MSA, data = df, type= c(smooth, o)) On 11/23/06, Chuck Cleland [EMAIL PROTECTED] wrote: Hello: I recall something like this being discuss recently, but I can't seem to locate an example in the archives. I have data like the following: df -

Re: [R] writing character to a file in UTF-8

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, ronggui wrote: I would like to now if there a universal way to writing a character vector to a file in UTF-8 encoding? By universal, I mean a way which works under Linux, Windows and Mac. You need to know what encoding the character vector is in. If you know it to be

[R] Problem with as.ts(zoo-object)

2006-11-23 Thread Albrecht, Dr. Stefan (AZ Private Equity Partner)
Dear all, I have an error message, when I try to convert a zoo object (called test) to ts (on R 2.4.0, Package zoo version 1.2-1, Windows XP) test 1994-05-10 1994-06-09 1994-07-09 0.0024943889 0.0024881824 0.0006955831 str(test) atomic [1:3] 0.002494 0.002488 0.000696 - attr(*,

Re: [R] Using roman and italic fonts in an xlab expression for a plot

2006-11-23 Thread Gabor Grothendieck
Try this: plot(1, xlab = quote(Level is ~ italic(M))) or plot(1, xlab = quote(Level ~ is ~ italic(M)) On 11/23/06, Philip Boland [EMAIL PROTECTED] wrote: Just wondering if it is possible to put something like The excess level is M in the xlab position of a plot but where the M is in

[R] t.test()

2006-11-23 Thread Robin Hankin
Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). My null hypothesis is that x[1] is drawn from a Gaussian distribution of the same mean as observations x[-1], which are assumed to be iid Gaussian. The (unknown) variance of

Re: [R] t.test()

2006-11-23 Thread ONKELINX, Thierry
There is no such thing as an unpaired t-test. A t-test can be a paired, one sample or two sample t-test. Since you want to compare the sample against a given mean, you need a one sample t-test. You tried to do a two sample test. That didn't work because you need at least two observations in each

[R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Jenny Barnes
Dear R-help community I am trying to write an R object (data.out) to a file in order to re-access it later and not have to re-load up the array with data every time. Here is the form of data.out data.out - list(lats=seq(88.542, -88.542, length=94), lons=seq(0, 360-1.875,

Re: [R] Problem with as.ts(zoo-object)

2006-11-23 Thread Gabor Grothendieck
Its a bug. Thanks. It will be fixed in the next version of zoo. In the meantime I will send you a fix offline. On 11/23/06, Albrecht, Dr. Stefan (AZ Private Equity Partner) [EMAIL PROTECTED] wrote: Dear all, I have an error message, when I try to convert a zoo object (called test) to ts (on

Re: [R] t.test()

2006-11-23 Thread Robin Hankin
Hello everybody thanks for your advice here. I think I'm getting tangled up. If I use Thierry's test on iid Gaussian data, the returned p-value should be uniform(0,1), right? OK, R f - function(x){t.test(x=x[-1],mu=x[1])$p.value} R hist(replicate(1000,f(rnorm(5 This is very skewed

Re: [R] t.test()

2006-11-23 Thread Peter Dalgaard
ONKELINX, Thierry [EMAIL PROTECTED] writes: There is no such thing as an unpaired t-test. A t-test can be a paired, one sample or two sample t-test. Since you want to compare the sample against a given mean, you need a one sample t-test. You tried to do a two sample test. That didn't work

Re: [R] t.test()

2006-11-23 Thread Peter Dalgaard
Robin Hankin [EMAIL PROTECTED] writes: Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). My null hypothesis is that x[1] is drawn from a Gaussian distribution of the same mean as observations x[-1], which are assumed to

Re: [R] t.test()

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, ONKELINX, Thierry wrote: There is no such thing as an unpaired t-test. A t-test can be a paired, one sample or two sample t-test. Since you want to compare the sample against a given mean, you need a one sample t-test. You tried to do a two sample test. That didn't work

Re: [R] t.test()

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, Peter Dalgaard wrote: Robin Hankin [EMAIL PROTECTED] writes: Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). My null hypothesis is that x[1] is drawn from a Gaussian distribution of the same mean

Re: [R] t.test()

2006-11-23 Thread Antonio, Fabio Di Narzo
23 Nov 2006 14:48:31 +0100, Peter Dalgaard [EMAIL PROTECTED]: ONKELINX, Thierry [EMAIL PROTECTED] writes: There is no such thing as an unpaired t-test. A t-test can be a paired, one sample or two sample t-test. Since you want to compare the sample against a given mean, you need a one

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, Jenny Barnes wrote: Dear R-help community I am trying to write an R object (data.out) to a file in order to re-access it later and not have to re-load up the array with data every time. Here is the form of data.out data.out - list(lats=seq(88.542, -88.542, length=94),

Re: [R] command option for R CMD BATCH

2006-11-23 Thread Vladimir Eremeev
Patrick Connolly p_connolly at ihug.co.nz writes: What I'd like to do is avoid the need to make the Month.r files and have the script pass the month information directly to the function that a single .r file would call. ?commandArgs __

Re: [R] command option for R CMD BATCH

2006-11-23 Thread Prof Brian Ripley
Try this: gannet% cat month.R x - commandArgs() print(x[length(x)]) gannet% R --slave --args January month.R [1] January On Thu, 23 Nov 2006, Patrick Connolly wrote: I wish to use R CMD BATCH to run a small R function which reads a text file and plots a single graph to a PDF file.

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Jenny Barnes
Thank you for your response Professor Ripley, Having tried again your suggestion of load() worked (well - it finished, which I assume it meant it worked). However not I am confused as to how I can check it has worked. I typed data.out$data which called up the data from the file - but I'm not

Re: [R] t.test()

2006-11-23 Thread Thilo Kellermann
Hi, seems as if you want to test if a single subject is a member of a population from which you have drawn a sample. This question has been addressed by Payne Jones and Crawford and collaborators. You should have a look at their articles in case that I interpreted your null-hypothesis and

[R] barplot - x-axis

2006-11-23 Thread Antje
Hi there, I have a barplot and the labels at the x-axis are strings, which are rotated by 90°. But now the sub-title of the barplot is in between these labels, which does not look very nice... Could anybody help me finding the parameter-setting to prevent this? par(mai=c(1.5,1,1,0.6))

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, Jenny Barnes wrote: Thank you for your response Professor Ripley, Having tried again your suggestion of load() worked (well - it finished, which I assume it meant it worked). However not I am confused as to how I can check it has worked. I typed data.out$data which

Re: [R] command option for R CMD BATCH

2006-11-23 Thread Ramon Diaz-Uriarte
On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote: Try this: gannet% cat month.R x - commandArgs() print(x[length(x)]) gannet% R --slave --args January month.R [1] January Is the above R --slave --args January month.R the preferred way of using it? I tend to use R

[R] loading libraries on MPI cluster

2006-11-23 Thread Michela Cameletti
Dear R-users, we are using library(snow) for computation on a linux cluster with RMPI. We have a problem with clusterEvalQ: after launching clusterEvalQ it seems loading the required library on each node but if we type a function belonging to the loaded package R doesn't find it. library(snow)

[R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Antonio, Fabio Di Narzo
Dear all, I'm indirectly faced with the fact that setting the 'tsp' attribute of an object modifies its class definition: class( structure(1:2, tsp=c(1,2,1), class=c(myts,ts)) ) [1] ts myts In general, this is of really little (ok, I admit: totally no) interest for me because 'myts' class is

Re: [R] command option for R CMD BATCH

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, Ramon Diaz-Uriarte wrote: On Thursday 23 November 2006 15:44, Prof Brian Ripley wrote: Try this: gannet% cat month.R x - commandArgs() print(x[length(x)]) gannet% R --slave --args January month.R [1] January Is the above R --slave --args January month.R the

[R] lasso for AFT model

2006-11-23 Thread Shakhawat Hossain
Hi all, I want to apply lasso method in AFT model. can anybody help me how to get lasso estimate using AFT model. Hossain [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Prof Brian Ripley
On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote: Dear all, I'm indirectly faced with the fact that setting the 'tsp' attribute of an object modifies its class definition: class( structure(1:2, tsp=c(1,2,1), class=c(myts,ts)) ) [1] ts myts In general, this is of really little (ok, I

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Barry Rowlingson
Jenny Barnes wrote: Having tried again your suggestion of load() worked (well - it finished, which I assume it meant it worked). However not I am confused as to how I can check it has worked. I typed data.out$data which called up the data from the file - but I'm not sure if this

Re: [R] loading libraries on MPI cluster

2006-11-23 Thread Uwe Ligges
Michela Cameletti wrote: Dear R-users, we are using library(snow) for computation on a linux cluster with RMPI. We have a problem with clusterEvalQ: after launching clusterEvalQ it seems loading the required library on each node but if we type a function belonging to the loaded package R

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Jenny Barnes
Thank you Barry for your time in responding! I think that will really help - the difference between attach and load were not clear to me before your reply! Also I did not know about rm() - thank you for the detail, I know you took longer than you had planned but I do appreciate it, For those

Re: [R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Antonio, Fabio Di Narzo
2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]: On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote: Dear all, I'm indirectly faced with the fact that setting the 'tsp' attribute of an object modifies its class definition: class( structure(1:2, tsp=c(1,2,1), class=c(myts,ts)) ) [1] ts

Re: [R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Gabor Grothendieck
On 11/23/06, Antonio, Fabio Di Narzo [EMAIL PROTECTED] wrote: 2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]: On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote: Dear all, I'm indirectly faced with the fact that setting the 'tsp' attribute of an object modifies its class definition:

Re: [R] barplot - x-axis

2006-11-23 Thread Petr Pikal
Hi barplot(data, las=2, ylim = c(0,plotMax+1), ylab = Percentage, main = filename, sub = subtitle) Error in barplot.default(data, las = 2, ylim = c(0, plotMax + 1), ylab = Percentage, : 'height' must be a vector or a matrix Your code gives me an error, as I do not have data

[R] Conversion from expression to numeric

2006-11-23 Thread Paul Smith
Dear All I am trying to convert from the type expression to the type numeric. The following works: x - expression(6.2) as.numeric(as.character(x)) [1] 6.2 However, the following does not work: x - expression(62/100) as.numeric(as.character(x)) [1] NA Warning message: NAs introduced by

Re: [R] loading libraries on MPI cluster

2006-11-23 Thread Dirk Eddelbuettel
On 23 November 2006 at 16:08, Michela Cameletti wrote: | Dear R-users, | we are using library(snow) for computation on a linux cluster with RMPI. | We have a problem with clusterEvalQ: after launching clusterEvalQ it seems | loading the required library on each node but if we type a function |

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Barry Rowlingson
Paul Smith wrote: x - expression(62/100) as.numeric(as.character(x)) [1] NA Warning message: NAs introduced by coercion Any idea about how to deal with the second case? eval-uate the expression: x - expression(62/100) eval(x) [1] 0.62 Barry

[R] nonlinear regression-getting the explained variation

2006-11-23 Thread inaki
Hi, I'm trying to teach myself R, and by the way, re-learning statistics using Crawley's Statistics: an introduction using R. I've reached the regression chapter, and when it deals with non-linear regresion using the nls library I face the following problem: I follow the steps---

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Paul Smith
On 11/23/06, Barry Rowlingson [EMAIL PROTECTED] wrote: x - expression(62/100) as.numeric(as.character(x)) [1] NA Warning message: NAs introduced by coercion Any idea about how to deal with the second case? eval-uate the expression: x - expression(62/100) eval(x) [1]

Re: [R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Gabor Grothendieck
On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 11/23/06, Antonio, Fabio Di Narzo [EMAIL PROTECTED] wrote: 2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]: On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote: Dear all, I'm indirectly faced with the fact that setting the

[R] Partial derivatives of a matrix with respect to a single element

2006-11-23 Thread Ron E. VanNimwegen
UseRs, We are using projection matrices in demographic analyses, and one technique is to calculate partial derivatives of a matrix with respect to a variable appearing in one or more of its elements. For example, consider the matrix A: | a*b a*c | | d d | If I'm not mistaken, the

[R] converting from numeric to Date

2006-11-23 Thread COMTE Guillaume
Hi all, I have a Date, that has been converted to a number that represent the count of seconds since year 1970, how do i convert it to a date ? Example : Limite_x-c(1131408000,1163548800) is(limite_x) [1] numeric vector But these numbers are dates, did R provide something that give

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: Dear All I am trying to convert from the type expression to the type numeric. The following works: x - expression(6.2) as.numeric(as.character(x)) [1] 6.2 However, the following does not work: x - expression(62/100)

Re: [R] Partial derivatives of a matrix with respect to a single element

2006-11-23 Thread Gabor Grothendieck
Try the Ryacas package: library(Ryacas) a - Sym(a); b - Sym(b); c - Sym(c); d - Sym(d) M - List(List(a*b, a*c), List(d, d)) deriv(M, a) expression(list(list(b, c), list(0, 0))) On 11/23/06, Ron E. VanNimwegen [EMAIL PROTECTED] wrote: UseRs, We are using projection matrices in demographic

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Paul Smith
On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: I am trying to convert from the type expression to the type numeric. The following works: x - expression(6.2) as.numeric(as.character(x)) [1] 6.2 However, the following does not work: x -

Re: [R] converting from numeric to Date

2006-11-23 Thread Peter Dalgaard
COMTE Guillaume [EMAIL PROTECTED] writes: Hi all, I have a Date, that has been converted to a number that represent the count of seconds since year 1970, how do i convert it to a date ? Example : Limite_x-c(1131408000,1163548800) is(limite_x) [1] numeric vector Not really:

Re: [R] dumping/loading objects with 'tsp' attribute

2006-11-23 Thread Antonio, Fabio Di Narzo
2006/11/23, Gabor Grothendieck [EMAIL PROTECTED]: On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 11/23/06, Antonio, Fabio Di Narzo [EMAIL PROTECTED] wrote: 2006/11/23, Prof Brian Ripley [EMAIL PROTECTED]: On Thu, 23 Nov 2006, Antonio, Fabio Di Narzo wrote: Dear all,

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Gabor Grothendieck
On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote: On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: I am trying to convert from the type expression to the type numeric. The following works: x - expression(6.2) as.numeric(as.character(x)) [1] 6.2

Re: [R] means over factors in mlm terms

2006-11-23 Thread Michael Friendly
Thanks, Richard Years ago, I recall reading a tech report on an elegant system in APL for doing (M)ANOVA via a series of successive projections of the response(s) on the series of (successively orthogonalized) basis vectors of the design matrix. (Written by RMH) Perhaps this was what you were

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: Thanks, Peter. I did not know about the existence of the command 'eval', in spite of the fact of having searched the Internet for a solution for my problem. 'eval' seems not working in connection with Ryacas: library(Ryacas) x - yacas(2/3*5/7) x

Re: [R] converting from numeric to Date

2006-11-23 Thread jim holtman
Limite_x-c(1131408000,1163548800) structure(Limite_x, class=c(POSIXt,POSIXct)) [1] 2005-11-07 19:00:00 Eastern Standard Time 2006-11-14 19:00:00 Eastern Standard Time On 11/23/06, COMTE Guillaume [EMAIL PROTECTED] wrote: Hi all, I have a Date, that has been converted to a number that

Re: [R] Conversion from expression to numeric

2006-11-23 Thread Gabor Grothendieck
Also note that Ryacas provides an Eval which has a yacas method that simplifies writing this: library(Ryacas) Eval(yacas(1/2)) See ?Eval On 11/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 11/23/06, Paul Smith [EMAIL PROTECTED] wrote: On 23 Nov 2006 18:20:17 +0100, Peter Dalgaard

Re: [R] SOLVED: Speed Optimization: Faster Way of Accessing array (was: data.frame) in a Loop?

2006-11-23 Thread Sven C. Koehler
On Sat, Nov 11, 2006 at 05:22:30AM +, Prof Brian Ripley wrote: I don't see how this code can work at all. '[-.data.frame' does not accept three arguments, e.g. women[1,2,3] - 17 Error in `[-.data.frame`(`*tmp*`, 1, 2, 3, value = 17) : unused argument(s) (3) If df is in fact

[R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Paul Smith
Dear All I am doing the following: x - yacas(3/2) for (i in 2:400) +x - yacas(paste(x,*,x)) x expression(Inf^1.260864167e+117/Inf^6.304320836e+116) Eval(x) [1] NaN No luck this way. However, I am successful with y - yacas((3/2)^400) y

[R] statistics help

2006-11-23 Thread Rohan Saldanha
hi im a bioinformatics student as i have never had any previous programming experience i need help this is the question i need to answer: Random walk model we want to model a random walk where you take a step to the left with probability p and one to the right with probability 1-p. Now

[R] Is there a faster way to change parts of this array?

2006-11-23 Thread Sven C. Koehler
Hello, I have another question on accessing arrays: | a- array(0, c(1, 100, 10)) | b - c(1,4) | for (i in 1:1) { for (j in 1:100) { a[i,j,b] - (1:10)[b] }} Is there a way to replace the nested for loops by a faster operation? I tried to use `a[1:1, 1:100, b] - (1:10)[b]' but that

Re: [R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Peter Dalgaard
Paul Smith [EMAIL PROTECTED] writes: Dear All I am doing the following: x - yacas(3/2) for (i in 2:400) +x - yacas(paste(x,*,x)) x expression(Inf^1.260864167e+117/Inf^6.304320836e+116) Eval(x) [1] NaN No luck this way. However, I am successful with y - yacas((3/2)^400)

Re: [R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Gabor Grothendieck
There is likely some limitation in the Ryacas interface that needs to be addressed by the Ryacas developers. yacas itself can support very large numbers so just use yacas directly. Aside from that I, as mentioned previously in this thread, yacas returns a yacas object and that is a complex

Re: [R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Paul Smith
On 23 Nov 2006 20:17:15 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: I am doing the following: x - yacas(3/2) for (i in 2:400) +x - yacas(paste(x,*,x)) x expression(Inf^1.260864167e+117/Inf^6.304320836e+116) Eval(x) [1] NaN No luck this way. However, I am successful

Re: [R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Detlef Steuer
If Ryacas/Yacas cannot multiply fractions with simultaenously very large numerators and denominators, what else should I use? Did you try package gmp ? Hth Detlef Thanks in advnace, Paul __ R-help@stat.math.ethz.ch mailing list

[R] help

2006-11-23 Thread Aimin Yan
consider p as random effect with 5 levels, what is difference between these two models? p5.random.p - lmer(Y ~p+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) p5.random.p1 - lmer(Y ~1+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) thanks, Aimin Yan

[R] lme function

2006-11-23 Thread Mark Wilson
Hello. As advised by Mick Crawley in his book on S+, I'm trying to use the lme function to examine a linear relationship between two variables measured at 60 locations in 12 sites, while taking account of any spatial autocorrelation (i.e. similarity in variation between the two variables that is

[R] lasso for cox model

2006-11-23 Thread Shakhawat Hossain
Hi all, I want to apply lasso in AFT model. Is there any R function available, I can get lasso estimate. Thanks Rinco [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] help

2006-11-23 Thread rolf
The word ``help'' does NOT constitute an informative subject line. cheers, Rolf Turner [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list

[R] Aggregating and merging files

2006-11-23 Thread David Kaplan
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] random effect question and glm

2006-11-23 Thread Aimin Yan
consider p as random effect with 5 levels, what is difference between these two models? p5.random.p - lmer(Y ~p+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) p5.random.p1 - lmer(Y ~1+(1|p),data=p5,family=binomial,control=list(usePQL=FALSE,msV=1)) in addtion, I try these

[R] show unique combination of two factor

2006-11-23 Thread Aimin Yan
p factor have 5 levels aa factor have 19 levels. totally it should have 95 combinations. but I just find there are 92 combinations. Does anyone know how to code to find what combinations are missed? Thanks, Aimin __ R-help@stat.math.ethz.ch mailing

Re: [R] Ryacas and fractions with simultaenously very large numerators and denominators

2006-11-23 Thread Gabor Grothendieck
Also just to be clear this does not mean that you cannot use very large numbers. It means that you need to keep them on the yacas side and move them over right at the end and at that point they must not be so large that R itself cannot handle them. For example, this works because all the

Re: [R] Fitting mixed-effects models with lme with fixed error term variances

2006-11-23 Thread Virgilio Gómez-Rubio
Hello again, And excuse me for not replying in real time. I am subscribed in digest mode and the data that generated my question are in a computer not connected to the Internet. Douglas Bates replied to my original mail and he requested the following: Can you be more specific about which

[R] plot() and Jpeg() increase font size and resolution

2006-11-23 Thread Alexander.Herr
Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can change fontsize with cex.axis in a normal plot, so I presume

Re: [R] how to forecast the GARCH volatility?

2006-11-23 Thread Spencer Graves
comments in line Rick Xu wrote: Dear All, I have loaded package(tseries), but when I run predict.garch(...) R tells me could not find function predict.garch, however ?predict.garch shows me The secret is methods dispatch. predict function (object, ...) UseMethod(predict)

Re: [R] SNA packages/network package

2006-11-23 Thread Spencer Graves
I haven't seen a reply to this post, so I will offer some comments even though I do not recall any previous exposure to social network analysis or the 'sna' package. I'm sorry I can't answer your question directly. However, if you wouldn't mind posting a minimal example of something

Re: [R] reaccessing array at a later date - trying to write it to file

2006-11-23 Thread Henrik Bengtsson
Here is a simple function that allow you to load the objects stored by save() into an evironment (to avoid loading them into the global workspace): loadToEnv - function(...) { env - new.env() load(..., env=env) env } x - 1:10 save(file=foo.xdr, x, letters, R.version) objects -

Re: [R] command option for R CMD BATCH

2006-11-23 Thread Patrick Connolly
On Thu, 23-Nov-2006 at 02:44PM +, Prof Brian Ripley wrote: | Try this: | | gannet% cat month.R | x - commandArgs() | print(x[length(x)]) | | gannet% R --slave --args January month.R | [1] January That's exactly what I needed. Thank you Brian for a concise and thorough answer. --

[R] View code of function

2006-11-23 Thread Lize van der Merwe
Dear list I need to see the code behind a function. I used to be able to see the code behind a function by typing e.g. mean(). Now I get the error message: Error in mean.default() : argument x is missing, with no default. Please advise. Regards Lize van der Merwe -- This e-mail

Re: [R] View code of function

2006-11-23 Thread Wee-Jin Goh
Hi, Just type mean.default without the () and the code of the function will be displayed. Wee-Jin On 24 Nov 2006, at 06:31, Lize van der Merwe wrote: Dear list I need to see the code behind a function. I used to be able to see the code behind a function by typing e.g. mean(). Now

[R] error in latex() : n.group

2006-11-23 Thread Ben
When I was running the function latex() I got an error about a not found object : n.rgroup ... I searched the archive of this (great!) list and found a solution ( http://tolstoy.newcastle.edu.au/R/e2/help/06/10/3995.html) : source('http://biostat.mc.vanderbilt.edu/tmp/getLatestSource.s');

Re: [R] Aggregating and merging files

2006-11-23 Thread Petr Pikal
Hi maybe ?aggregate or ?merge can help you. cheers Petr On 23 Nov 2006 at 15:18, David Kaplan wrote: Date sent: Thu, 23 Nov 2006 15:18:07 -0600 From: David Kaplan [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject:[R]

Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution

2006-11-23 Thread Roger Bivand
On Fri, 24 Nov 2006 [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its model (vgm) with plot and using jpeg(). Also the resolution in the jpeg call does not work. I am using R2.4 on Mandriva 10.2 linux. I can

Re: [R] [R-sig-Geo] plot() and Jpeg() increase font size and resolution

2006-11-23 Thread Edzer J. Pebesma
plotting variograms in gstat is done through xyplot in lattice; you'll find where it gets it's defaults by library(lattice) trellis.par.get() ?trellis.par.set -- Edzer [EMAIL PROTECTED] wrote: Dear list, I am having troubles increasing the fontize when plotting a variogram{gstat} and its