[R] Error while connecting to Oracle using RODBC package

2010-07-14 Thread vikrant
Dear All, I want to connnect R with oracle. I am using RODBC package for this connection. Following is my code to connect library(RODBC) channel - odbcConnect(Vikrant) I am getting following error. 1: In odbcDriverConnect(DSN=Vikrant) : [RODBC] ERROR: state NA000, code 12288, message

[R] logical to numeric matrix changing dimensions

2010-07-14 Thread Felipe Bhering
example: y=(rbind(c(TRUE,TRUE,TRUE),c(FALSE,FALSE,FALSE))) y [,1] [,2] [,3] [1,] TRUE TRUE TRUE [2,] FALSE FALSE FALSE as.numeric(y) [1] 1 0 1 0 1 0 I am trying to make some important matrixes become nuemric (1 or 0) but they change their dimensions.. anyone know how to easily fix

[R] How to define a function (with '-') that has two arguments?

2010-07-14 Thread thmsfuller...@gmail.com
Hi All, The last line if the following code returns the error right below this paragraph. Essentially, I use the operator %:% to retrieve a variable in a nested frame. Then I want to use the same operator (with '-') to change its value. I'm not sure if this is possible in R with %:% operator.

[R] Set environment name

2010-07-14 Thread thmsfuller...@gmail.com
Hello All, ?environmentName shows how to get the environment name. But I don't see how to set the name in the first place. Could you tell me where to look for the function that set the environment name? -- Tom __ R-help@r-project.org mailing list

[R] logical to numeric matrix changing dimensions

2010-07-14 Thread Felipe Bhering
example: y=(rbind(c(TRUE,TRUE,TRUE),c( FALSE,FALSE,FALSE))) y [,1] [,2] [,3] [1,] TRUE TRUE TRUE [2,] FALSE FALSE FALSE as.numeric(y) [1] 1 0 1 0 1 0 I am trying to make some important matrixes become nuemric (1 or 0) but they change their dimensions.. anyone know how to easily fix

Re: [R] FYI: matrix surprise

2010-07-14 Thread Prof Brian Ripley
Better moral: read the basic documentation. You missed matrix indexing (indexing an array with a matrix subscript), and that is described in 'An Introduction to R', section 5.3 E.g. s$p - match(s$prefix, colnames(y)) y[cbind(s$idx, s$p)] - s$val (You are trying to use different types of

Re: [R] create variables with indexes

2010-07-14 Thread Jeff Newmiller
In virtually every case where people think they need gobs of similarly-named variables, what they really need are vectors or data frames. I strongly recommend reading the Introduction to R document again to learn how to create them and access individual elements and subsets of elements.Data

Re: [R] POSIXlt error

2010-07-14 Thread Meissner, Tony (DFW)
OK, I thought I was being explicit enough, but here goes. The out of the first five rows of mu dataframe is: Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity bearingvelcat 1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6180.28 4.352

Re: [R] ccf function

2010-07-14 Thread vikrant
Hi Megan, Answer for you third question. This function will return the maximum CCF value along with corresponding lag value. Input to this function are a and b which are nothing but two time series. Find_Max_CCF- function(a,b) { d - ccf(a, b, plot = FALSE) cor = d$acf[,,1] lag =

Re: [R] Error while connecting to Oracle using RODBC package

2010-07-14 Thread vikrant
Please help if anybody has got this error earlier. Or please explain how should I use package RODBC to connect to oracle -- View this message in context: http://r.789695.n4.nabble.com/Error-while-connecting-to-Oracle-using-RODBC-package-tp2288304p2288389.html Sent from the R help mailing list

[R] Odp: create variables with indexes

2010-07-14 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 14.07.2010 00:44:02: Hi, there: Suppose I want create variables with indexes in their names, e.g., X_1_1, X_1_2, X_1_3, ..., X_1_10, X_2_1, X_2_2, X_2_3, .. X_2_10,..., X_10_1, X_10_2, ... X_10_10. It looks like I need to use 2 indexes I and J

Re: [R] POSIXlt error for 1982-01-01

2010-07-14 Thread Paul Hiemstra
Hi, Thanks for the reproducible example. as.POSIXlt(1982-01-01) works fine for me. You did not specify which OS, R version etc you are using, which is requested by the posting guide. If you haven't done so already, please upgrade R to the latest version, this might help. My info: R version

Re: [R] POSIXlt error -Oops

2010-07-14 Thread Meissner, Tony (DFW)
OK, I thought I was being explicit enough, but here goes. The out of the first five rows of mu dataframe is: Time hour lev.morgan lev.lock2 lev.lock1 flow direction velocity bearingvelcat 1 2009-07-06 15:00:00 15 3.266 3.274 3.240 1710.6180.28 4.352

[R] Odp: logical to numeric matrix changing dimensions

2010-07-14 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 14.07.2010 07:54:51: example: y=(rbind(c(TRUE,TRUE,TRUE),c(FALSE,FALSE,FALSE))) y [,1] [,2] [,3] [1,] TRUE TRUE TRUE [2,] FALSE FALSE FALSE as.numeric(y) [1] 1 0 1 0 1 0 I am trying to make some important matrixes become nuemric

Re: [R] logical to numeric matrix changing dimensions

2010-07-14 Thread Patrick Burns
You want: storage.mode(y) - numeric as said, for instance, on page 49 of 'The R Inferno'. On 14/07/2010 07:04, Felipe Bhering wrote: example: y=(rbind(c(TRUE,TRUE,TRUE),c( FALSE,FALSE,FALSE))) y [,1] [,2] [,3] [1,] TRUE TRUE TRUE [2,] FALSE FALSE FALSE as.numeric(y) [1] 1 0

Re: [R] [R-pkgs] New package list for analyzing list surveyexperiments

2010-07-14 Thread Martin Maechler
RR == Raubertas, Richard richard_rauber...@merck.com on Tue, 13 Jul 2010 13:46:41 -0400 writes: RR I agree that 'list' is a terrible package name, but only RR secondarily because it is a data type. The primary RR problem is that it is so generic RR as to be almost totally

Re: [R] A problem about the package lme4 in R-2.11.1

2010-07-14 Thread Martin Maechler
NC == Nai-Wei Chen s90225...@yahoo.com.tw on Wed, 14 Jul 2010 05:20:09 +0800 (CST) writes: (to both R-help and R-SIG-mixed-models; this is called cross posting and not liked, even considered impolite. I'm only replying to R-help ..) NC Dear all R-users, When I install the package

Re: [R] Wilcox.test U values

2010-07-14 Thread Peter Dalgaard
Worik R wrote: I have been examining the Mann-Whitney test closely. And there are two features of the R implementation that puzzles me. The test statistic is reported as W and depends on the order of the arguments to the function. Why calculate U, or W, at all? Did you read the note on

Re: [R] How to define a function (with '-') that has two arguments?

2010-07-14 Thread Peter Dalgaard
thmsfuller...@gmail.com wrote: Hi All, The last line if the following code returns the error right below this paragraph. Essentially, I use the operator %:% to retrieve a variable in a nested frame. Then I want to use the same operator (with '-') to change its value. I'm not sure if this

Re: [R] How to define a function (with '-') that has two arguments?

2010-07-14 Thread Hadley Wickham
On Wed, Jul 14, 2010 at 7:39 AM, thmsfuller...@gmail.com thmsfuller...@gmail.com wrote: Hi All, The last line if the following code returns the error right below this paragraph. Essentially, I use the operator %:% to retrieve a variable in a nested frame. Then I want to use the same operator

[R] Entropy of a Markov chain

2010-07-14 Thread Wilson, Andrew
Does anyone have any R code for computing the entropy of a simple first or second order Markov chain, given a transition matrix something like the following (or the symbol vector from which it is computed)? AGRe ARIe CSRe DIRe DSCe eos HRMe SPTe TOBe

[R] force or assert interactive use with the --ess parameter in Windows

2010-07-14 Thread Daniel Sachse
Dear R community, I have been perusing your mailing list (via Nabble) but have not been able to find a suitable solution yet. First of all, my aim would be to run R (or Rterm or Rscript) interactively, while still being able to start the session with an R-script and command line parameters.

[R] levene.test

2010-07-14 Thread martanair
I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in a data frame and correspond to 1 factor plus response. Could someone please give me an example about how to use the

Re: [R] levene.test

2010-07-14 Thread Gavin Simpson
On Wed, 2010-07-14 at 01:37 -0700, martanair wrote: I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. Err, yes it does, several examples in fact. My data are in a data frame and

Re: [R] levene.test

2010-07-14 Thread Bernardo Rangel Tura
On Wed, 2010-07-14 at 01:37 -0700, martanair wrote: I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in a data frame and correspond to 1 factor plus response. Could

[R] Query about wilcox.test() P-value

2010-07-14 Thread Govind Chandra
Hi, I find that the p-value printed out by wilcox.test() and the p-value stored in the p.value attribute in the object returned by wilcox.test() are not the same. There seems to be a lower limit of 2.2e-16 for the printed value although it does say that it is less than that. What I want to know

[R] set the structure before xtable

2010-07-14 Thread n.via...@libero.it
Dear list, I would like to know if there is a package in R which is able to set the structure of the element of a list or dataframe in order to use xtable's options without problems. I will do an example to be more clear: if I have a list like this with the following element: $ind1

[R] reverse string

2010-07-14 Thread Trafim Vanishek
Dear all, Are there any functions in R to reverse the order of the string. smth like reverse(abc) to get cba? Thanks a lot. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] levene.test

2010-07-14 Thread Gavin Simpson
On Wed, 2010-07-14 at 06:50 -0300, Bernardo Rangel Tura wrote: On Wed, 2010-07-14 at 01:37 -0700, martanair wrote: I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in

[R] rotate dendrogram

2010-07-14 Thread Ralph Modjesch
Hi, I have searched a methode to rotate a dendrogramm with the leafs to the left The dendrogram with the leafs to the bottom. plot(hclust(dist(USArrests), ave)) plot from the dendrogram{stats} packages can rotate the dendrogram, but only with the leafs to the right.

Re: [R] reverse string

2010-07-14 Thread Martyn Byng
Hi, I've no idea if there is a function for doing it, but if not, the following seems to work a = this is a string paste(rev(substring(a,1:nchar(a),1:nchar(a))),collapse=) Martyn -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of

Re: [R] reverse string

2010-07-14 Thread Gavin Simpson
On Wed, 2010-07-14 at 12:13 +0200, Trafim Vanishek wrote: Dear all, Are there any functions in R to reverse the order of the string. smth like reverse(abc) to get cba? paste(rev(strsplit(abc, split = )[[1]]), collapse = ) [1] cba If your real data is a vector of strings to reverse then

[R] randomForest outlier return NA

2010-07-14 Thread Pau Carrio Gaspar
Dear R-users, I have a problem with randomForest{outlier}. After running the following code ( that produces a silly data set and builds a model with randomForest ): ### library(randomForest) set.seed(0) ## build data set X - rbind( matrix( runif(n=400,min=-1,max=1), ncol =

Re: [R] reverse string

2010-07-14 Thread Petr PIKAL
Hi Quick glance to strsplit help page strReverse - function(x) sapply(lapply(strsplit(x, NULL), rev), paste, collapse=) Regards Petr r-help-boun...@r-project.org napsal dne 14.07.2010 12:36:12: On Wed, 2010-07-14 at 12:13 +0200, Trafim Vanishek wrote: Dear all, Are there any

Re: [R] reverse string

2010-07-14 Thread Gabor Grothendieck
On Wed, Jul 14, 2010 at 6:13 AM, Trafim Vanishek rdapam...@gmail.com wrote: Dear all, Are there any functions in R to reverse the order of the string. smth like reverse(abc) to get cba? Suppose data.frame DF has a column for which we wish to reverse each component. Then using the builtin

[R] Convergent series

2010-07-14 Thread David Bickel
What are some reliable R functions that can compute the value of a convergent series? David -- David R. Bickel, PhD Associate Professor Ottawa Institute of Systems Biology Biochem., Micro. and I. Department Mathematics and Statistics Department University of Ottawa 451 Smyth Road Ottawa,

[R] send out put to file in R

2010-07-14 Thread chakri_amateur
Hi I am using igraph package in R. My goal is to read a network (in pajek format) and decompose the network into components. In addition, I am also interested in sending this output to to a file. I am having problem in while writing to a file! my code looks like this g - read.graph

[R] count - help

2010-07-14 Thread barbara horta e costa
Hi, I have a data frame with several factors and I want to count the occurrences of an event resulting from an interaction of some factors. I tried to do several tables (and then converting to d.f and then merge them by one factor and the freq Tab1 - merge

[R] Sample size ANCOVA

2010-07-14 Thread Karl Knoblick
Hallo! Does anyone know a possibility to perform a sample size estimation for an ANCOVA? Would be great! Thanks Karl __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Convergent series

2010-07-14 Thread Ted Harding
On 14-Jul-10 10:57:02, David Bickel wrote: What are some reliable R functions that can compute the value of a convergent series? David Please give an example of a definition (as you would specify it to an R function) of a convergent series that you want to compute! Your query is about as

[R] count - help

2010-07-14 Thread barbara horta e costa
Hi, I have a data frame with several factors and I want to count the occurrences of an event resulting from an interaction of some factors. I tried to do several tables (and then converting to d.f and then merge them by one factor and the freq Tab1 - merge

[R] Multilevel IRT Modelling

2010-07-14 Thread Dr. Federico Andreis
Dear All, does anybody know of a package (working under Linux) for multilevel IRT modelling? I'd love to do this without having to go on WINSTEPS or the like.. thanks for the attention! Federico Andreis - Dr. Federico Andreis Università degli Studi di Milano-Bicocca, PhD Student MEB

[R] Odp: count - help

2010-07-14 Thread Petr PIKAL
Hi You does not say much about what you really did. You probably want to consult table or xtabs functions xtabs(~Petal.Width+Species, data=iris) Species Petal.Width setosa versicolor virginica 0.1 5 0 0 0.2 29 0 0

Re: [R] Set environment name

2010-07-14 Thread Prof Brian Ripley
On Tue, 13 Jul 2010, thmsfuller...@gmail.com wrote: Hello All, ?environmentName shows how to get the environment name. But I don't see how to set the name in the first place. Could you tell me where to look for the function that set the environment name? It is not AFAIK possible from R code.

[R] Mathematica and R

2010-07-14 Thread David Bickel
What are some effective ways to leverage the strengths of R and Mathematica for the analysis of a single data set? More specifically, are there any functions that can assist with any of the following? 1. Calling an R function from Mathematica. 2. Calling a Mathematica function from R. 3.

[R] levene.test

2010-07-14 Thread martanair
I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in a data frame and correspond to 1 factor plus response. Could someone please give me an example about how to use the

Re: [R] levene.test

2010-07-14 Thread Peter Ehlers
On 2010-07-14 6:07, martanair wrote: I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in a data frame and correspond to 1 factor plus response. Could someone please give me

Re: [R] levene.test

2010-07-14 Thread Gavin Simpson
On Wed, 2010-07-14 at 05:07 -0700, martanair wrote: I am trying to use Levene's test (of package car), but I do not understand quite well how to use it. '?levene.test' does not unfortunately provide any example. My data are in a data frame and correspond to 1 factor plus response. Could

Re: [R] Set environment name

2010-07-14 Thread Gabor Grothendieck
On Wed, Jul 14, 2010 at 7:53 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Tue, 13 Jul 2010, thmsfuller...@gmail.com wrote: Hello All, ?environmentName shows how to get the environment name. But I don't see how to set the name in the first place. Could you tell me where to look for

Re: [R] levene.test

2010-07-14 Thread martanair
the value of the F-test is uncorrect. If I calculate the Levene's Test for Homogeneity of Variance with SPSS I get F = 5.128 Pr ( F) = 0.033 Why? what is the exact formula which R calculate Levene's test for two groups? Thanks marta -- View this message in context:

Re: [R] send out put to file in R

2010-07-14 Thread Peter Ehlers
On 2010-07-14 4:04, chakri_amateur wrote: Hi I am using igraph package in R. My goal is to read a network (in pajek format) and decompose the network into components. In addition, I am also interested in sending this output to to a file. I am having problem in while writing to a file! my

Re: [R] levene.test

2010-07-14 Thread Gavin Simpson
On Wed, 2010-07-14 at 05:47 -0700, martanair wrote: the value of the F-test is uncorrect. If I calculate the Levene's Test for Homogeneity of Variance with SPSS I get F = 5.128 Pr ( F) = 0.033 Why? what is the exact formula which R calculate Levene's test for two groups? Thanks marta Who

Re: [R] levene.test

2010-07-14 Thread John Fox
Dear Marta, As it says in ?levene.test, The version of Levene's test implemented here is based on absolute deviations from the group medians. Other, less robust, versions, not implemented, are based on absolute deviations from group means or trimmed means. What does SPSS do? (Possibly it uses

[R] plot month and year

2010-07-14 Thread linda.s
R Code begins unem=read.csv(book5.csv,header=T,row.names=1) attach(unem) unem1=ts(unem$Allen, start=1) ts.plot(unem1,main=Allen) points(unem1,type=o) R Code ends because the time starts at JAN_08 and ends on DEC_09, how to make the y axis in the plot show month starting from JAN_08 instead of

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Peter Ehlers
On 2010-07-14 3:53, Govind Chandra wrote: Hi, I find that the p-value printed out by wilcox.test() and the p-value stored in the p.value attribute in the object returned by wilcox.test() are not the same. There seems to be a lower limit of 2.2e-16 for the printed value although it does say that

Re: [R] plot month and year

2010-07-14 Thread linda.s
R Code begins unem=read.csv(book5.csv,header=T,row.names=1) attach(unem) unem1=ts(unem$a, start=1) ts.plot(unem1,main=a) points(unem1,type=o) R Code ends because the time starts at JAN_08 and ends on DEC_09, how to make the y axis in the plot show month starting from JAN_08 instead of having the

Re: [R] levene.test

2010-07-14 Thread Peter Ehlers
On 2010-07-14 6:47, martanair wrote: the value of the F-test is uncorrect. If I calculate the Levene's Test for Homogeneity of Variance with SPSS I get F = 5.128 Pr ( F) = 0.033 Why? Why do you assume that SPSS provides the correct value? what is the exact formula which R calculate

Re: [R] count - help

2010-07-14 Thread Dieter Menne
barbara horta e costa wrote: I have a data frame with several factors and I want to count the occurrences of an event resulting from an interaction of some factors. I'd only need a table as excel does with pivot table and summarize data as count Only what pivot tables does: Pivot

Re: [R] Sample size ANCOVA

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 6:13 AM, Karl Knoblick wrote: Hallo! Does anyone know a possibility to perform a sample size estimation for an ANCOVA? Would be great! Thanks Karl I don't know of a function in R that performs this directly. However, if you Google:

Re: [R] plot month and year

2010-07-14 Thread Achim Zeileis
You do not provide a reproducible example, as the posting guide asks you to. But I guess that your time series setup using ts() is insufficient, see ?ts. If the data starts in January 2008, why do you tell R that it starts in 1? Presumably you have monthly data and unem1 - ts(unem$a, start

Re: [R] Error while connecting to Oracle using RODBC package

2010-07-14 Thread Marc Schwartz
On Jul 13, 2010, at 11:57 PM, vikrant wrote: Dear All, I want to connnect R with oracle. I am using RODBC package for this connection. Following is my code to connect library(RODBC) channel - odbcConnect(Vikrant) I am getting following error. 1: In odbcDriverConnect(DSN=Vikrant) :

Re: [R] a very particular plot

2010-07-14 Thread Ian Bentley
Hi Dennis, Thanks for the quick reply. Once I removed solid = TRUE, which was giving errors, the code is accepted fine. It's strange though, no legend appears. Even when I try something simple like: p + scale_shape_manual(values=1:3) No legend appears. I can't find any similar problems on

Re: [R] calling a c function from R

2010-07-14 Thread Matt Shotwell
Fahim, Please see the Writing R Extensions manual http://cran.r-project.org/doc/manuals/R-exts.pdf There are simple instructions in this document under the heading System and foreign language interfaces. -Matt On Wed, 2010-07-14 at 01:21 -0400, Fahim Md wrote: Hi, I am trying to call a C

Re: [R] levene.test

2010-07-14 Thread martanair
how do I calculate the differences from the mean? levene.test(filedati$y , filedati$fertilizzante, location=mean) Is it right? regards marta -- View this message in context: http://r.789695.n4.nabble.com/levene-test-tp2288632p2288832.html Sent from the R help mailing list archive at

Re: [R] Mathematica and R

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 6:59 AM, David Bickel wrote: What are some effective ways to leverage the strengths of R and Mathematica for the analysis of a single data set? More specifically, are there any functions that can assist with any of the following? 1. Calling an R function from

Re: [R] Mathematica and R

2010-07-14 Thread Albyn Jones
Take a look at Sage, which is an open source alternative. It already integrates R (http://www.sagemath.org) albyn Quoting David Bickel davidbickel.com+rh...@gmail.com: What are some effective ways to leverage the strengths of R and Mathematica for the analysis of a single data set?

Re: [R] Convergent series

2010-07-14 Thread David Bickel
Thanks, Ted. I meant to post this previous reply to the list: On 10-07-14 07:43, David Bickel wrote: Hi Ted, Here are my translations to integrate-like syntax of a conflation of examples from the following Mathematica pages: x - 2.232; sum(f = function(n) {x^n/factorial(n)}, lower = 0, upper

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread Joshua Wiley
Hi, Can you show the results of str() on your original dataframe? Also it would help if you could make an example that demonstrates your problem. I used this little example, and did not notice any problems: samp.frame - data.frame(a = 1:10, b = c(3,2,5,3,1,5,NA,4,5,NA)) str(samp.frame)

[R] Changing model parameters in the mi package

2010-07-14 Thread Andrew Miles
I am trying to use the mi package to impute data, but am running into problems with the functions it calls. For instance, I am trying to impute a categorical variable called min.func. The mi() function calls the mi.categorical() function to deal with this variable, which in turn calls the

[R] Split a time series

2010-07-14 Thread Megh Dal
Hi all, can somebody help me to split a time series (zoo) object on monthwise. For example, suppose I have following time series object: library(zoo) dat1 - zooreg(rnorm(300), start=as.Date(2009-01-01), frequency=1) From dat1, I want to create a list-object dat2 like: dat2[[1]] - all

Re: [R] Entropy of a Markov chain

2010-07-14 Thread Albyn Jones
The transition matrix is a collection of conditional distributions. it would seem natural to compute the entropy of the stationary distribution. albyn Quoting Wilson, Andrew a.wil...@lancaster.ac.uk: Does anyone have any R code for computing the entropy of a simple first or second order

Re: [R] question about SVM in e1071

2010-07-14 Thread Pau Carrio Gaspar
Hello Jack, 1 ) why do you thought that larger C is prone to overfitting than smaller C ? 2 ) if you look at the formulation of the quadratic program problem you will see that C rules the error of the cutting plane ( and overfitting ). Therfore for hight C you allow that the cutting plane

Re: [R] Split a time series

2010-07-14 Thread Achim Zeileis
On Wed, 14 Jul 2010, Megh Dal wrote: Hi all, can somebody help me to split a time series (zoo) object on monthwise. For example, suppose I have following time series object: library(zoo) dat1 - zooreg(rnorm(300), start=as.Date(2009-01-01), frequency=1) From dat1, I want to create a

Re: [R] a very particular plot

2010-07-14 Thread Jeff Newmiller
Ggplot will only produce legends based on factors. Integers are not factors. Ian Bentley ian.bent...@gmail.com wrote: Hi Dennis, Thanks for the quick reply. Once I removed solid = TRUE, which was giving errors, the code is accepted fine. It's strange though, no legend appears. Even when I try

Re: [R] levene.test

2010-07-14 Thread John Fox
Dear Marta, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of martanair Sent: July-14-10 10:21 AM To: r-help@r-project.org Subject: Re: [R] levene.test how do I calculate the differences from the mean?

Re: [R] count - help

2010-07-14 Thread barbara horta e costa
Hi, Thanks a lot. here is a fraction of my df: Sample Season Area Gear Depth 1 W 1 5 1 2 Sp 1 3 1 2 Sp 1 5 1 2 Sp 1 11 1

[R] how to update a bugs-model from inside R using R2WinBUGS

2010-07-14 Thread Frédéric Holzwarth
Hello there, is there a way to update a model, which was called by bugs()? For instance starting with few iterations and then updating more and more, as is possible inside the WinBUGS-window. If set debug=TRUE, then the window remains open and updating is possible, but it is no longer

[R] Using which function with xts

2010-07-14 Thread Manussawee Sukunta
Hi everyone: I did a search over the internet and still couldn't find answer to my problem. I have a series of prices that I'm trying to clean up by removing any prices greater than 3 times the standard deviations. So, say that prices are: price1 2010-06-18 08:00:06.916

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread syrvn
Hi, I used str() on my data set: $ X1: num 1 1 0 1 1 1 1 1 1 1 ... $ X2: num 0 1 0 2 1 2 0 2 2 0 ... $ X3: Factor w/ 4 levels 0,1,2,NA: 2 1 3 1 1 1 1 1 1 3 ... The difference to your str() output is that in your case NA columns are num columns and in

[R] transfer glm model from SAS

2010-07-14 Thread Bond, Stephen
Please, tell what is the best way to create an R glm object with parameters etc estimated in SAS? I have a large dataset and bigglm fails to converge, so estimation is done is SAS. However, there are a lot of predictions that are much more easily done in R and I would like to use glm.predict

[R] ver 2.11.1 from xterm on Mac without lme4

2010-07-14 Thread Andrea Foulkes
Hi, I just installed version 2.11.1 on my Mac OS X 10.5.2. When I try running R from my xterm, I get the following error: Error in loadNamespace(name) : there is no package called 'lme4' Fatal error: unable to restore saved data in .RData I am returned to the terminal prompt and can not run

Re: [R] Changing model parameters in the mi package

2010-07-14 Thread Andrew Miles
I figured this one out. I'm sending the solution back to the help list so that there is a record of how to deal with this problem, since it does not seem to be documented elsewhere. The mi.info object that you pass to the the mi() function contains a value called params which allows you

Re: [R] Error while connecting to Oracle using RODBC package

2010-07-14 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Marc Schwartz Sent: Wednesday, July 14, 2010 7:05 AM To: vikrant Cc: r-help@r-project.org Subject: Re: [R] Error while connecting to Oracle using RODBC package On Jul 13,

Re: [R] [R-pkgs] New package list for analyzing list surveyexperiments

2010-07-14 Thread Jeffrey J. Hallman
Well, as the author of two CRAN packages with short names (tis and fame), I maintain that short names can be fairly informative. The fame package is an interface to FAME time series databases, and the tis package implements the tis (TimeIndexedSeries) class and support classes that it needs.

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Govind Chandra
Hi Peter, Thanks for your response. Yes, I am interested in P-values smaller than 1e-16. Below a certain value they may not tell much about significance but are useful for ordering (ranking), for example, differentially expressed genes in microarray data. Something similar is done by sequence

[R] Win Server x64/R: Memory Allocation Problem

2010-07-14 Thread will . eagle
Dear all, how can I use R on a 64-bit Windows Server 2003 machine (24GB RAM) with more than 3GB of working memory and make full use of it. I started R --max-mem-size=3G since I got the warning that larger values are too large and ignored. In R I got: memory.size(max=FALSE) [1] 10.5

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread Joshua Wiley
More importantly than just that they are factors, NA is actually a level of X3. If it was a factor column, but NA was not a level, than in the conversion to numeric, it would not change into a 4, but it is a level (in fact the 4th level), so it becomes a 4. From ?factor here is the recommended

[R] Cannot Build R From Source - Windows XP

2010-07-14 Thread Steve Pederson
Hi, I can't seem to install R from source. I've downloaded the latest Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ done a full installation of that and Inno Setup. I have set R_HOME as C:\R (and also tried using C:\R\R-2.11.1) After successfully running 'tar xf

Re: [R] Query about wilcox.test() P-value

2010-07-14 Thread Marc Schwartz
You need to understand the difference between how a value is stored in an R object with full floating point precision versus how a value in R is displayed (printed) in the console with a print method. In this case, wilcox.test() returns an object of class 'htest' (as noted in the Value section

Re: [R] ver 2.11.1 from xterm on Mac without lme4

2010-07-14 Thread Faisal Moledina
On Wed, Jul 14, 2010 at 11:17 AM, Andrea Foulkes foul...@schoolph.umass.edu wrote: Hi, I just installed version 2.11.1 on my Mac OS X 10.5.2. When I try running R from my xterm, I get the following error: Error in loadNamespace(name) : there is no package called 'lme4' Fatal error: unable

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread syrvn
Thanks again for your quick reply. I understood your procedure but now it is even more strange why my conversion does not work. In your example, the NA values are in brackets NA and what your procedure does is to convert these NA values into NA and then it seems to be possible to use data.matrix

Re: [R] Win Server x64/R: Memory Allocation Problem

2010-07-14 Thread Dirk Eddelbuettel
On Wed, Jul 14, 2010 at 05:51:17PM +0200, will.ea...@gmx.net wrote: Dear all, how can I use R on a 64-bit Windows Server 2003 machine (24GB RAM) with more than 3GB of working memory and make full use of it. I started R --max-mem-size=3G since I got the warning that larger values are too

Re: [R] how to update a bugs-model from inside R using R2WinBUGS

2010-07-14 Thread Ben Bolker
Frédéric Holzwarth frederic.holzwarth at uni-leipzig.de writes: Hello there, is there a way to update a model, which was called by bugs()? For instance starting with few iterations and then updating more and more, as is possible inside the WinBUGS-window. If set debug=TRUE, then the

Re: [R] ver 2.11.1 from xterm on Mac without lme4

2010-07-14 Thread Marc Schwartz
On Jul 14, 2010, at 10:17 AM, Andrea Foulkes wrote: Hi, I just installed version 2.11.1 on my Mac OS X 10.5.2. When I try running R from my xterm, I get the following error: Error in loadNamespace(name) : there is no package called 'lme4' Fatal error: unable to restore saved data in

[R] problem of loading workspace

2010-07-14 Thread Yan Jiao
I'm using R x64 2.11.0(windows) I was trying to load workspace I saved some days ago, but got the error: ReadItem: unknown type 63, perhaps written by later version of R. Has anyone come across the same problem? Any solutions? Many thanks yan

Re: [R] convert data.frame to matrix - NA factor problem

2010-07-14 Thread Erik Iverson
syrvn wrote: Thanks again for your quick reply. I understood your procedure but now it is even more strange why my conversion does not work. In your example, the NA values are in brackets NA and what your procedure does is to convert these NA values into NA and then it seems to be possible to

[R] Estimating a differential equation parameters based on a data set

2010-07-14 Thread Oscar Rodriguez
Hello R community: Here is another question, How can I estimate a differential equation parameters based on a data set? If you know where I can find some examples will be better, Thanks again, and cheers, Oscar Rodriguez Gonzalez Mobile: 519.823.3409 PhD Student Canadian

Re: [R] Cannot Build R From Source - Windows XP

2010-07-14 Thread Duncan Murdoch
On 14/07/2010 12:01 PM, Steve Pederson wrote: Hi, I can't seem to install R from source. I've downloaded the latest Rtools211.exe from http://www.murdoch-sutherland.com/Rtools/ done a full installation of that and Inno Setup. I have set R_HOME as C:\R (and also tried using C:\R\R-2.11.1)

Re: [R] a very particular plot

2010-07-14 Thread Ista Zahn
Hi all, Maybe I missed some crucial context (I did not follow the example all the way through). But of course ggplot will make legends based on integers. For example: dat - data.frame(x=sample(1:10, 100, replace=TRUE), y=sample(1:10, 100, replace=TRUE),

Re: [R] Want to exclude a column when using sample function

2010-07-14 Thread Addi Wei
id pID50 apol a_acca_acid a_aro a_base a_count 1 mol.11 3.63 -0.882267 -0.527967 -0.298197 -1.032380 0 -1.063410 2 mol.14 3.38 -1.007330 -0.527967 -0.298197 -1.032380 0 -1.063410 3 mol.19 3.18 1.153560 1.407910 -0.298197 1.254100 0 1.160080 4 mol.20

  1   2   >