[R] Plotting implicit functions in R

2009-11-12 Thread Rofizah Mohammad
Hello, How can I plot several implicit functions (F(x,y)=0) on the same figure? Regards Rofizah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Problem building R 2.10.0 - Matrix package

2009-11-12 Thread Martin Maechler
TA == Thomas Adams thomas.ad...@noaa.gov on Mon, 02 Nov 2009 11:04:30 -0500 writes: TA All: TA Attached is the output file from building R 2.10.0 on RedHat Linux. I TA have never previously experienced any problems when building R from TA source with new releases. But, now

[R] Rearranging long tables, Sweave, xtable, LaTeX

2009-11-12 Thread Ottorino-Luca Pantani
Dear R-users, consider the two following outputs, ## 1 and ## 2 \begin{Scode}{Setup, echo = FALSE, print = FALSE, eval = TRUE} with(expand.grid(Fact1 = 1:3, Fact2 = 1:40), table(Fact1, Fact2)) ## 1 xtable(with(expand.grid(Fact1 = 1:3, Fact2 = 1:40), table(Fact1, Fact2)))

Re: [R] Non linear programming optimization (which package to use?)

2009-11-12 Thread Erwin Kalvelagen
Jerome Chong jeromechong at gmail.com writes: Hello, 1) Is there any nonlinear programming optmizer that I can user for the following problem? Obj function: (max) revenue = price * volume Constraints: price and volume pair must be from the following variable data set: Variable data

[R] Mango Solutions' 2010 public R training schedule

2009-11-12 Thread Sarah Lewis
Mango Solutions' 2010 public R training schedule is now available. Introduction to R 11th - 12th January, Bath R for Financial Data Analysis 19th - 20th January, London Introduction to R 2nd - 3rd February, Basel, Switzerland R for Pharmacometrics 16th - 17th February, Manchester The R

Re: [R] Partial correlations and p-values

2009-11-12 Thread Ista Zahn
1) Think about what you did wrong. It doesn't make sense to do correlation/regression with variables of different lengths. You can have missing values in one or more variables, if that's what you mean. Just code them NA. 2) Just add in the predictors, e.g. residuals(lm(y ~ z1 + z2)) -Ista On

[R] Substituting vectors into a legend

2009-11-12 Thread Bob O'Hara
I have a simple (!) problem. What I want to do is to create a legend with Greek letters, and substituting numbers into the legend. Like this: mu=1:3 Mean=rep(mu, each=20) plot(runif(60), rnorm(60,Mean,0.1), pch=Mean) # create a plot legend(0.6,1.7, paste(mu =, 1:3), pch=mu) but with a Greek

Re: [R] Rearranging long tables, Sweave, xtable, LaTeX

2009-11-12 Thread Ista Zahn
Yeah, I've had this kind of situation before. Usually I first see if I can fit it on the page by rotating it and/or reducing the size. If that doesn't do it then I'll re-arrange as you suggest. Basically the print method is just wrapping the output after n columns (27 in my case, but I think this

[R] Stat question mixed models with time varying covariate

2009-11-12 Thread Peter Flom
Please xcuse me for being slightly off-topic and cross-posting I have a data set of schools, with scores for 4 years. The goal is to evaluate the effect of an intervention on the scores, accounting for some covariates which are not problematic. The chief problem is that the intervention could

Re: [R] Rearranging long tables, Sweave, xtable, LaTeX

2009-11-12 Thread Ottorino-Luca Pantani
Ista Zahn ha scritto: Yeah, I've had this kind of situation before. Usually I first see if I can fit it on the page by rotating it and/or reducing the size. If that doesn't do it then I'll re-arrange as you suggest. Basically the print method is just wrapping the output after n columns (27 in my

[R] A VaR question

2009-11-12 Thread Christofer Bogaso
Hi, I got some problem to drop a mail while using Nabble account, therefore sending it again there. My query is following : Hi all, My question is not directly R related but rather a finance related question. Therefore I was wondering wheher I find a reliable answer here. Here I wanted to

Re: [R] saving custom functions to existing library

2009-11-12 Thread Duncan Murdoch
venkata kirankumar wrote: Hi all, I writen one function in Rgui(R Editor) I saved it as testfunction.R and while I am running that file using source(C:/testfunction.R) its running and it is giving subsequent result insted of this there is any thing like to save my function to save in

Re: [R] trap window pop up when running 'bugs' in R

2009-11-12 Thread Duncan Murdoch
Dongli Zhou wrote: Hi, I'm writing to ask what is the reason that a Trap window always pops up in WinBUGS? I'm tring to run the function 'bugs' in R for a zero-inflated gaussian model. The contents appear in the Trap window is as follows: That message comes from the WinBUGS runtime.

Re: [R] Rearranging long tables, Sweave, xtable, LaTeX

2009-11-12 Thread Ista Zahn
Well you can add in the column names, but this looks weird unless you format it as a table heading. I'm not that familiar with xtable, but you can do it with Hmisc::latex as follows: (tmp2 - rbind(tmp[,1:20], colnames(tmp[,21:40]), tmp[,21:40])) a b c d e f g h i j k l

Re: [R] Plotting implicit functions in R

2009-11-12 Thread Duncan Murdoch
Rofizah Mohammad wrote: Hello, How can I plot several implicit functions (F(x,y)=0) on the same figure? You can use contour(..., levels=0), then repeat with add=T. See the examples in ?contour to set up the inputs. Duncan Murdoch __

Re: [R] Partial correlations and p-values

2009-11-12 Thread dadrivr
The variables have the same length, but with different numbers of missing values (NA). As a result, the residuals calculations (xres yres) have different lengths, and I cannot compute the correlation between the two (error of incompatible dimensions - see example below). Is there a way, when

[R] t-test

2009-11-12 Thread amor Gandhi
Dear all, Is there any bayesian t-test in R? Many thanks, Gandhi __ z gegen Massenmails. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] XML: Reading transition matrices into R

2009-11-12 Thread stefan.d...@gmail.com
Hello, from a software I have the following output in xml (see below): It is a series of matrices, for each age one. I have 3 categories (might vary in the application), hence, 3x3 matrices where each element gives the probability of transition from i to j. I would like read this data into R

[R] Reading .sav (SPSS) files.

2009-11-12 Thread Praveen Surendran
Hi, I used the method read.spss() in library(foreign) to read a .sav file using commands. library(foreign) data.sav - read.spss('masterfile.sav') mydat - as.data.frame(data.sav) It's throwing some warnings..

[R] How can I get contour plot on this data?

2009-11-12 Thread Mao Jianfeng
Dear R-listers, I have a data set which combine population (site name), longitude, latitude, altitude, initial (for flowering of a plant), and end (also for flowering of the same plant) of each site. Now, I want to make contour plot to display the initial or end of the spatial pattern of

Re: [R] Sweave() within a function: objects not found

2009-11-12 Thread Pfaff, Bernhard Dr.
On 11/11/2009 12:09 PM, Pfaff, Bernhard Dr. wrote: Dear list subscriber, suppose, I do have a minimal Sweave file 'test.Rnw': \documentclass{article} \begin{document} printx= x @ \end{document} Within R, I define the following function: f - function(x){ Sweave(test.Rnw) }

[R] Help with Rserve

2009-11-12 Thread Ruben Cabrera
Dear colleagues: I'm very interested in Rserve because I'm trying to model (time series) remotely using a terminal (Windows XP) over a database in a server (Windows Vista) by internet. My first question: Is Rserve the solution to work remotely with R (for time series analysis) with databases?

[R] How to select the part of column name heads?

2009-11-12 Thread Julia Cains
  Dear R helpers,   Suppose I am reading a csv file as   yd    =   read.csv(mydata.csv)   The actual data in the mydata.csv file is say for example like this -     Date day_1 days_15 day_30days_60days_90  days_180 Nov 11    5 14   1  

[R] Odp: How can I get contour plot on this data?

2009-11-12 Thread Petr PIKAL
Hi here is what help says x,y locations of grid lines at which the values in z are measured. These must be in ascending order. By default, equally spaced values from 0 to 1 are used. If x is a list, its components x$x and x$y are used for x and y, respectively. If the list has component z

[R] Odp: How to select the part of column name heads?

2009-11-12 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 12.11.2009 14:59:57: Dear R helpers, Suppose I am reading a csv file as yd= read.csv(mydata.csv) The actual data in the mydata.csv file is say for example like this - Date day_1 days_15 day_30days_60

[R] A comparison between span in lowess method and h in sm.regression

2009-11-12 Thread FMH
Dear All, I have fitted a bivariate and an additive model on a monthly temperature from 1987-2007 via nonparametric regression and would like to compare between these models via F-test, but having difficulty in determining the possible values of span with lowess method. For instance, these

Re: [R] XML: Reading transition matrices into R

2009-11-12 Thread Duncan Temple Lang
stefan.d...@gmail.com wrote: Hello, from a software I have the following output in xml (see below): It is a series of matrices, for each age one. I have 3 categories (might vary in the application), hence, 3x3 matrices where each element gives the probability of transition from i to j. I

Re: [R] R echo code chunk runs off the page using Lyx and Sweave

2009-11-12 Thread Mark Connolly
Ista Zahn wrote: options(width=n) is supposed to work, and does for me. I don't use Lyx though... -Ista On Tue, Nov 10, 2009 at 4:27 PM, Mark Connolly mark_conno...@acm.org wrote: I am not really sure where in the interactions this is handled, but I would like to keep echo-ed R code

Re: [R] Substituting vectors into a legend

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 4:59 AM, Bob O'Hara wrote: I have a simple (!) problem. What I want to do is to create a legend with Greek letters, and substituting numbers into the legend. Like this: mu=1:3 Mean=rep(mu, each=20) plot(runif(60), rnorm(60,Mean,0.1), pch=Mean) # create a plot

[R] Question about simulation design...

2009-11-12 Thread Jeff Harring
Help R list servers, I have 500 external data sets for a simulation study that I would like to bring into R to analyze. They have the names data1.dat, data2.dat, ..., dataN.dat Is there a way to automatize the bringing in of these data sets in R using the read.table function within a

[R] [R-pkgs] NEW release of FRAILTYPACK

2009-11-12 Thread Rondeau Virginie
Dear All, We are happy to announce, after a long gestation, the release of the new version of FRAILTYPACK (version 2.2-9.5) which is now available from CRAN. The package fit general frailty models using penalized likelihood estimation, for clustered or recurrent events. For instance : --

[R] Automatizing Simulation in R

2009-11-12 Thread Jeff Harring
I have a question regarding automatizing simulation runs in R... I have 500 external data sets for a simulation study that I would like to bring into R to analyze. They have the names data1.dat, data2.dat, ..., dataN.dat Is there a way to automatize the bringing in of these data sets in R

[R] barplot at specific x values

2009-11-12 Thread Bastian Pöschl
Dear useRs, I search for a possibillity to plot stacked bars at specific x positions. I tried and tried, but the only way i got something adequate was by using lowlevel plots segments(). That is quiet ok, but will not please eyes without a lot of par() lines.

[R] R package for reading / writing 3D file (. PLY)

2009-11-12 Thread kvarpun
Hi, Is there an R package that reads and writes 3D images having the extension PLY (PLY images of Stanford University)? Currently, I installed the package misc3d. This package displays these images PLY, but it can neither read nor write PLY images. Thank you to tell me the name of a package

Re: [R] LINEAR MIXED EFFECT

2009-11-12 Thread ANARPCG
Milton's point is dead-on, and I would highly encourage you to give the posting guide a look. That said... you might try na.action = na.omit in your call to... actually, we don't know what function you are using (see first point). Regardless, sounds like you have missing data and na.action

[R] A combinatorial optimization problem: finding the best permutation of a complex vector

2009-11-12 Thread Ravi Varadhan
Hi, I have a complex-valued vector X in C^n. Given another complex-valued vector Y in C^n, I want to find a permutation of Y, say, Y*, that minimizes ||X - Y*||, the distance between X and Y*. Note that this problem can be trivially solved for Real vectors, since real numbers possess the

Re: [R] dividing a matrix by positive sum or negative sum depending on the sign

2009-11-12 Thread Hao Cen
Hi David and Dimitris, Thanks for your suggestions. They are very helpful. Jeff On Wed, November 11, 2009 12:12 pm, David Winsemius wrote: On Nov 11, 2009, at 10:57 AM, David Winsemius wrote: On Nov 11, 2009, at 10:36 AM, Dimitris Rizopoulos wrote: one approach is the following: mat

Re: [R] Automatizing Simulation in R

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 8:42 AM, Jeff Harring wrote: I have a question regarding automatizing simulation runs in R... I have 500 external data sets for a simulation study that I would like to bring into R to analyze. They have the names data1.dat, data2.dat, ..., dataN.dat Is there a way

Re: [R] By processing on two variables at once?

2009-11-12 Thread hadley wickham
aggregate(dat$value, list(dat$x, dat$y), mean)  Group.1 Group.2  x 1       1       1 15 2       1       2 30 newdat -aggregate(dat$value, list(dat$x, dat$y), mean) names(newdat) - c(x,y,bquote(mean(value)) ) That bquote isn't necessary because you're already working with strings. c(x = 1, y

Re: [R] R package for reading / writing 3D file (. PLY)

2009-11-12 Thread Duncan Murdoch
On 11/12/2009 4:56 AM, kvarpun wrote: Hi, Is there an R package that reads and writes 3D images having the extension PLY (PLY images of Stanford University)? Currently, I installed the package misc3d. This package displays these images PLY, but it can neither read nor write PLY images. This

Re: [R] LINEAR MIXED EFFECT

2009-11-12 Thread Douglas Bates
On Thu, Nov 12, 2009 at 10:14 AM, milton ruser milton.ru...@gmail.com wrote: Hi Ana, I am not quite sure if it is the problem, but if you call your data.frame as exp, you will crash exp() function... try use another name for your data.frame. By the way, I suggest you not use attach(). Try

Re: [R] trap window pop up when running 'bugs' in R

2009-11-12 Thread Dongli Zhou
Thanks a lot! I'll write to them to ask about the problem. Dongli Duncan Murdoch wrote: Dongli Zhou wrote: Hi, I'm writing to ask what is the reason that a Trap window always pops up in WinBUGS? I'm tring to run the function 'bugs' in R for a zero-inflated gaussian model. The contents

[R] package tm fails to remove the with remove stopwords

2009-11-12 Thread Mark Kimpel
I am using code that previously worked to remove stopwords using package tm. Even manually adding the to the list does not work to remove the. This package has undergone extensive redevelopment with changes to the function syntax, so perhaps I am just missing something. Please see my simple

Re: [R] Non linear programming optimization (which package to use?)

2009-11-12 Thread Jerome Chong
Hello, 1) Is there any nonlinear programming optmizer that I can user for the following problem? Obj function: (max) revenue = price * volume Constraints: price and volume pair must be from the following variable data set: Variable data set: # price volume 1 10 500 2 20 450 3 30 330

Re: [R] barplot at specific x values

2009-11-12 Thread Richard M. Heiberger
Bastian Pöschl wrote: Dear useRs, I search for a possibillity to plot stacked bars at specific x positions. I tried and tried, but the only way i got something adequate was by using lowlevel plots segments(). That is quiet ok, but will not please eyes without a lot of par() lines.

Re: [R] package tm fails to remove the with remove stopwords

2009-11-12 Thread Sam Thomas
I'm not sure what's wrong with your approach, but this seems to strip the require(tm) params - list(minDocFreq = 1, removeNumbers = TRUE, stemming = TRUE, stopwords = TRUE,

Re: [R] Loadings and scores from fastICA?

2009-11-12 Thread Joel Fürstenberg-Hägg
Ok, so then the S gives the individual components, good. Thanks Tony! But what about the principal components from the PCA plot, how are they calculated? And are the linear mixing matrix A really the same as the loadings/weights? There must be different loadings for the PCA and ICA right?

Re: [R] Partial correlations and p-values

2009-11-12 Thread Peter Ehlers
dadrivr wrote: The variables have the same length, but with different numbers of missing values (NA). As a result, the residuals calculations (xres yres) have different lengths, and I cannot compute the correlation between the two (error of incompatible dimensions - see example below). Is

[R] Step Function Freezing R

2009-11-12 Thread Jgabriel
I have a question that might not be kosher here, but I'm running out of options and need some help. Basically using the function step is freezing R. I am running a model that includes a number of interactions on a large data set with a number of dummy variables representing whether an event

[R] Residuals with Elliot-Rothenberg-Stock Unit Root Test

2009-11-12 Thread Jose Iparraguirre D'Elia
Does anyone know how to retrieve the residuals after running an ERS unit root test on a time series (urca package)? There are no 'residuals' or 'res' (or similar) slots in the ur.ers-class, but a plot instruction - ie plot(ur.ers()) renders amongst other things a residual plot. If an

[R] Run an r file from the console

2009-11-12 Thread anna_l
Hello everybody, I am writing an r file in the same R working directory and I would like to know how can I just run the whole file by just entering the file´s name on the console. I put the file in the working directory but it didn´t work saying that the file_name object wasn´t found. In matlab

Re: [R] Non-normal residuals.

2009-11-12 Thread tomreilly
Kevin, Kudos to you for asking a question that most do not I have attached an analysis of your residuals for 10 inch called 10inchres.zip. I have also attached our analysis as 10inches.zip. I have posted some reports for you and added some commentary to help you understand this all fully.

Re: [R] R package for reading / writing 3D file (. PLY)

2009-11-12 Thread kvarpun
Duncan Murdoch-2 wrote: On 11/12/2009 4:56 AM, kvarpun wrote: Hi, Is there an R package that reads and writes 3D images having the extension PLY (PLY images of Stanford University)? Currently, I installed the package misc3d. This package displays these images PLY, but it can neither

[R] vector based command for equal values - if too slow

2009-11-12 Thread jorgusch
Hi, I have a big set of data with price lists in different periods. I want to check whether there are equal prices and if so, start a loop to look closer into it. However, my solution so far is based on a loop and I cannot think of a vector based approach...any ideas? # Counting vectors equali-0

[R] Dist function

2009-11-12 Thread Caio Azevedo
Hi all, Does anybody know which distance measure is used when the option method=binary is considered in the dist function? Thanks a lot in advance, Best, Caio [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] R package for reading / writing 3D file (. PLY)

2009-11-12 Thread Duncan Murdoch
On 11/12/2009 11:37 AM, kvarpun wrote: Duncan Murdoch-2 wrote: On 11/12/2009 4:56 AM, kvarpun wrote: Hi, Is there an R package that reads and writes 3D images having the extension PLY (PLY images of Stanford University)? Currently, I installed the package misc3d. This package displays

Re: [R] Run an r file from the console

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 12:41 PM, anna_l wrote: Hello everybody, I am writing an r file in the same R working directory and I would like to know how can I just run the whole file by just entering the file´s name on the console. I put the file in the working directory but it didn´t work

Re: [R] Dist function

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 1:20 PM, Caio Azevedo wrote: Hi all, Does anybody know which distance measure is used when the option method=binary is considered in the dist function? Did you look at the help page? -- David Winsemius, MD Heritage Laboratories West Hartford, CT

Re: [R] Loadings and scores from fastICA?

2009-11-12 Thread Tony Plate
ICA and PCA both model the data as a product of two matrices (usually called something like components or loadings weights or scores). It's how those matrices are constructed that differs. PCA is often a first step in doing ICA. I'd suggest reading the ICA tutorial by *Aapo Hyvärinen and

Re: [R] update.packages()

2009-11-12 Thread Patrick Connolly
On Wed, 11-Nov-2009 at 03:47PM +0100, CG Pettersson wrote: | Dear all, | | W.XP | | I recently upgraded to R2.10.0 and did what I usually do: copied all | special libraries from the old installation and then used | update.packages() on the command line. Nothing happened. Then I clicked | on the

[R] Problem building R 2.10.0 - Matrix package

2009-11-12 Thread R P Herrold
TA == Thomas Adams thomas.ad...@noaa.gov TA Attached is the output file from building R 2.10.0 on RedHat Linux. I TA have never previously experienced any problems when building R from TA source with new releases. But, now I get a compile error with the Matrix TA package: The Raw Hide

Re: [R] Rpad and R 2.10.0

2009-11-12 Thread Yihui Xie
Good job, Jeff! I've downloaded the source package, modified HTMLargs() as you suggested and recompiled the package. Rpad works perfectly now! Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor

Re: [R] update.packages()

2009-11-12 Thread Marc Schwartz
On Nov 12, 2009, at 1:00 PM, Patrick Connolly wrote: On Wed, 11-Nov-2009 at 03:47PM +0100, CG Pettersson wrote: | Dear all, | | W.XP | | I recently upgraded to R2.10.0 and did what I usually do: copied all | special libraries from the old installation and then used | update.packages() on

Re: [R] A combinatorial optimization problem: finding the best permutation of a complex vector

2009-11-12 Thread Charles C. Berry
On Thu, 12 Nov 2009, Ravi Varadhan wrote: Hi, I have a complex-valued vector X in C^n. Given another complex-valued vector Y in C^n, I want to find a permutation of Y, say, Y*, that minimizes ||X - Y*||, the distance between X and Y*. Note that this problem can be trivially solved for

Re: [R] Question about simulation design...

2009-11-12 Thread Peter Alspach
Tena koe Jeff Try something like: for (i in 1:n) { assign(paste('data', i, sep=''), read.table(paste('data', i, '.dat', sep=''), header=F)) . . . } HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

[R] Auto execute R script

2009-11-12 Thread Jason Gasper
Greetings, I am hoping someone can help me with a automation task. I would like to auto-run a script at a scheduled time each night. Basically, this auto-run would would call sqlQuery() and save the results of some math to a table- basically archiving a live database table. Has anyone done

Re: [R] Dist function

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 1:32 PM, David Winsemius wrote: On Nov 12, 2009, at 1:20 PM, Caio Azevedo wrote: Hi all, Does anybody know which distance measure is used when the option method=binary is considered in the dist function? Did you look at the help page? If you are having problems

Re: [R] Auto execute R script

2009-11-12 Thread Cedrick W. Johnson
This is on windows I am assuming? On linux, you can write a script, then have cron execute it, similar to below, only I think you need to replace Rterm with R CMD or something. Put this in a batch file, and create a scheduled task. Make sure to put the start in or working directory to the

[R] writing selfStart models that can deal with treatment effects

2009-11-12 Thread Michael A. Gilchrist
Hello, I'm trying to do some non-linear regression with 2 cell types and 4 tissue type treatments using selfStart models Following Ritz and Streibig (2009), I wrote the following routines: ##Selfstart expDecayAndConstantInflowModel - function(Tb0, time, aL, aN, T0){

Re: [R] Auto execute R script

2009-11-12 Thread Jason Gasper
Thanks Cedrick for your help- the batch file approach makes complete sense. It is a windows operating system. Cedrick W. Johnson wrote: This is on windows I am assuming? On linux, you can write a script, then have cron execute it, similar to below, only I think you need to replace Rterm with

Re: [R] Unexpected behavior for as.date()

2009-11-12 Thread Isabella Ghement
Re: [R] Unexpected behavior for as.date()Hi Terry, Many thanks for your clarifications! It's useful to know where and why things break down and also have a couple of back up options just in case. For now, I'll be extra careful with the date() library; in the future, I'll switch to working with

Re: [R] vector based command for equal values - if too slow

2009-11-12 Thread jim holtman
# no data given, so try something like this: # split by scanID and then check for dups dups - lapply(split(x$ListingPrice, x$ScanID,), function(.price){ # return sum of duplicated; non-zero = duplicated prices sum(duplicated(.price)) }) On Thu, Nov 12, 2009 at 12:11 PM, jorgusch

[R] QR-decomposition using the base package vs. Matrix package

2009-11-12 Thread Karl Pazdernik
I need to perform a QR-decomposition of a sparse matrix, so I've been trying to use the Matrix package. Unfortunately I don't seem to be getting exactly the same results as if I had used the qr() command from the base package. Here is an example of what I'm doing. spdata -rpois(50,1) y -

[R] xts conversion problem

2009-11-12 Thread Nandi
I have two data frames, with two columns each, the first being a Date variable. I would like to convert them to xts objects, indexed by the Date column. I would like to use as.Date and not as.POSIXct as the dateformat. The puzzling fact is that it works for the first one but not the other. Here is

Re: [R] xts conversion problem

2009-11-12 Thread David Winsemius
Looks as though str does not expose a sufficient amount of hte attributes of these objects to fully explain the differences. Why not post the results of dput on both objects? -- David On Nov 12, 2009, at 2:18 PM, Nandi wrote: I have two data frames, with two columns each, the first being

[R] starting html help for a package?

2009-11-12 Thread Liviu Andronic
Dear all Shouldn't this start the html help for the chosen package? help(package=boot, help_type = html) Instead, the text version is displayed in less (I believe). However, I have no issues to start the html help with the following. help.start() starting httpd help server ... done If

[R] Transforming a dataframe into a response/predictor matrix

2009-11-12 Thread Ki L. Matlock
I currently have a data frame whose rows correspond to each student and whose columns are different variables for the student, as shown below: Lastname Firstname CATALOG_NBR Email StudentID EMPLID Start 1 alastname afirstname1213 *...@uark.edu 10295236 #

Re: [R] XML: Reading transition matrices into R

2009-11-12 Thread stefan.d...@gmail.com
Hello, thanks a lot. This is a form which I can work with in R. Another question, which I hope is not a bridge too far: Can I write the R matrix which your code created back into the xml format (i.e. with the same tags and structure) from which it came and hence feed it back to the original

Re: [R] starting html help for a package?

2009-11-12 Thread Duncan Murdoch
Liviu Andronic wrote: Dear all Shouldn't this start the html help for the chosen package? help(package=boot, help_type = html) The page displayed there was never an HTML page. In the future it probably should be, but it hasn't been implemented yet. Instead, the text version is

Re: [R] Step Function Freezing R

2009-11-12 Thread J Dougherty
There are some points of information you should include. One, have there been recent updates of Windows that may have altered system behaviour? Two, have you updated R during the same period? Three, have you installed software that uses system resources that were available to R before - e.g.

Re: [R] Reading a data file one record at a time [SEC=UNCLASSIFIED]

2009-11-12 Thread jim holtman
try this: input - readLines(textConnection(header line + Ray1 header + gate1 1,2,3,4,5,6,7 + gate2 5,6,7,8,9,0 + Ray2 header + gate1 5,4,3,2,1 + gate2 8,7,6,5,4,34)) closeAllConnections() # delete first header line input - input[-1] # read the data one line at a time, parsing the data

Re: [R] How can this code be improved?

2009-11-12 Thread jim holtman
Run the script on a small subset of the data and use Rprof to profile the code. This will give you an idea of where time is being spent and where to focus for improvement. I would suggest that you do not convert the output of the 'table(t)' do a dataframe. You can just extract the 'names' to

[R] how to pass matrices from C to R effectively

2009-11-12 Thread Hao Cen
Hi, I have C code to produce a lot of matrices to be analyzed. As these matrices are large ( 1000*1) and are a lot ( 1000), I am thinking about how to pass them from C to R effectively. Would you think about the following solution? In R, I create a wrapper function passDataFromCToR =

Re: [R] how to pass matrices from C to R effectively

2009-11-12 Thread Duncan Murdoch
On 12/11/2009 6:45 PM, Hao Cen wrote: Hi, I have C code to produce a lot of matrices to be analyzed. As these matrices are large ( 1000*1) and are a lot ( 1000), I am thinking about how to pass them from C to R effectively. Would you think about the following solution? In R, I create a

Re: [R] How can this code be improved?

2009-11-12 Thread Richard R. Liu
Jim and Dennis, Thanks for your suggestions. Almost 24 hours later, the script has finished a bit more than half the reports. Free RAM varies between 1.2GB and a few MB. I hesitate to interrupt it in order to implement the improvements that you have suggested, lest they do not decrease

[R] how to contour plot on Date data.

2009-11-12 Thread Mao Jianfeng
Dear R-listers, I have a data set which combine population (site name), longitude, latitude, altitude, initial (for flowering of a plant), and end (also for flowering of the same plant) of each site. Now, I want to make contour plot to display spatial pattern of the initial or end of the

Re: [R] XML: Reading transition matrices into R

2009-11-12 Thread Duncan Temple Lang
stefan.d...@gmail.com wrote: Hello, thanks a lot. This is a form which I can work with in R. Another question, which I hope is not a bridge too far: Can I write the R matrix which your code created back into the xml format (i.e. with the same tags and structure) from which it came and

[R] Package to do Bode Plots and analysis?

2009-11-12 Thread Jason Rupert
By any chance are there any R packages that assist in producing Bode Plots and performing Bode analysis? Thanks again for any feedback and insights. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] linear model and by()

2009-11-12 Thread Sam Albers
Hello R list, This is a question for anyone who has used the by() command. I would like to perform a regression on a data frame by several factors. Using by() I think that I have able to perform this using the following: lm.r - by(master, list(Sectionf=Sectionf, startd=startd), function(x) lm

Re: [R] Transforming a dataframe into a response/predictor matrix

2009-11-12 Thread cls59
Ki L. Matlock wrote: I currently have a data frame whose rows correspond to each student and whose columns are different variables for the student, as shown below: Lastname Firstname CATALOG_NBR Email StudentID EMPLID Start 1 alastname afirstname1213

Re: [R] linear model and by()

2009-11-12 Thread Ista Zahn
Hi, You have not given us all the data needed to reproduce your analysis (what is SectionF?), but the issue is probably that lm.r is a list and you're not treating it that way. Try srt(lm.r) and summary(lm.r[[1]]) You may also want to look at the the lmList() function in the lme4 package.

[R] Splus

2009-11-12 Thread ozgur gultekin
I am modelling oil price data in s plus, but I have some problem in my code, especially while I am estimating my model (ARMA GARCH) and also I have some question too, anyone can help me about S-plus? I think it has same syntax with R Best reagards Ozgur

[R] why the same values cannot be judged to be the same in R

2009-11-12 Thread rusers.sh
Hi Rusers, I found sometimes that the same values cannot be judged to be the same in R. Anybody knows the probelm? I think i ignored some minor detail. Thanks. Here is the example.

Re: [R] why the same values cannot be judged to be the same in R

2009-11-12 Thread David Winsemius
On Nov 12, 2009, at 10:04 PM, rusers.sh wrote: Hi Rusers, I found sometimes that the same values cannot be judged to be the same in R. Anybody knows the probelm? I think i ignored some minor detail. Thanks. Here is the example.

[R] data frame subsets?

2009-11-12 Thread Douglas M. Hultstrand
Hello, I am trying to create data frame subsets based on binned temperature data. I have code working to create the bins (d.1 and d.2), but it takes two steps, I was wondering if I could merge into one step. See Below d n year mo da hr t td tw rh kPa 1 1 1945 3 1 0 1.1 0.0

Re: [R] data frame subsets?

2009-11-12 Thread Jorge Ivan Velez
Hi Douglas, Here is a suggestion: subset(d, t = 1 t 2) See ?subset for more information. HTH, Jorge On Thu, Nov 12, 2009 at 10:57 PM, Douglas M. Hultstrand wrote: Hello, I am trying to create data frame subsets based on binned temperature data. I have code working to create the bins

[R] binary data

2009-11-12 Thread karuna m
hi, I am trying to calculate distance matrices for binary data frame. I am using dist.binary in 'ade4' package. This is the code i run and get error message as 'missing value where True/False needed: clss - as.data.frame(cls) dist.binary(clss, method = 1, diag = FALSE, upper = FALSE) Also, if i

[R] Plotting Histogram using histogram() and for loop and I want to save the histogram individually ... HELP

2009-11-12 Thread ychu066
I am trying to write R codes for the histogram plot and saving it out. There will be 146 histogram plots in total…. I have the following R codes that draws the each Histogram …. library(lattice) for(i in 8:153){ histogram(~ data[,i] | data[,2],

[R] dfbetas vs dfbeta

2009-11-12 Thread alphaace
Hi, I've looked around but can't find a clear answer to the difference for these two? Any help? Thanks! -- View this message in context: http://old.nabble.com/dfbetas-vs-dfbeta-tp26331704p26331704.html Sent from the R help mailing list archive at Nabble.com.