Re: [R] Area Under a Curve

2008-07-02 Thread bartjoosen
You can take a look at AUC in the PK package stephen sefick wrote: I would like to integrate the area under a curve without any smoothing or the like- just on the raw numbers. I looked at integrate() but it requires a function which I assume means something like x+x^2+x^3 is there a

Re: [R] Fitting a curve to data

2008-07-02 Thread Vikas Rawal
There is an integrate.xy in sfsmic. Limitations discussed there. Also see trap.rule in Hmisc Vikas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] A regression problem using dummy variables

2008-07-02 Thread rlearner309
Yes. Because the slopes are supposed to be the same. Level shifts are needed to be modeled. Moshe Olshansky-2 wrote: Do you have a reason to treat all 3 levels together and not have a separate regression for each level? --- On Tue, 1/7/08, rlearner309 [EMAIL PROTECTED] wrote: From:

[R] bug in axis.Date? was (Re: newbie needs help plotting time series)

2008-07-02 Thread Petr PIKAL
Hi Kathi [EMAIL PROTECTED] napsal dne 01.07.2008 18:48:47: On Tue, 1 Jul 2008 14:33:12 +0200, Petr PIKAL wrote Kathi [EMAIL PROTECTED] napsal dne 01.07.2008 13:39:18: Thanks, Petr. After fiddling around some more with my code I found out that this seems to have something

Re: [R] Problem with loading library-ks

2008-07-02 Thread Uwe Ligges
Mayukh Dass wrote: Hi, I am trying to load the library(ks), but I am getting the following error: Loading required package: KernSmooth KernSmooth 2.22 installed Copyright M. P. Wand 1997 Loading required package: mvtnorm Loading required package: rgl Loading required package: misc3d Error in

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
Gavin Simpson [EMAIL PROTECTED] writes: Ok, lets sort this out. [Not tested as I don't have your data] df - data.frame(resp = cancerv1[, 408], VARS = as.matrix(cancerv1[, 2:407]) Actually, you _do_ need an I() here: df - data.frame(resp = cancerv1[, 408],

[R] Optimal lag selection in Granger Causality tests

2008-07-02 Thread tolga . i . uzuner
Dear R Users, Can someone point me to a R package which will help me optimally choose a lag for Granger Causality testing ? Many thanks in advance, Tolga Generally, this communication is for informational purposes only and it is not intended as an offer or solicitation for the purchase or sale

Re: [R] Optimal lag selection in Granger Causality tests

2008-07-02 Thread ONKELINX, Thierry
RSiteSearch(Granger Causality, restrict = functions) yields two hits. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg

[R] position legend below x-axis title

2008-07-02 Thread Anne-Marie Ternes
Dear helpers, I'm using a R script on several different datasets, which makes that axis scales may vary quite a lot from dataset to dataset. So what I'm looking for now, is how to automagically find out how to position the legend (horizontal) in the space below the x-axis title, and how to make

Re: [R] Optimal lag selection in Granger Causality tests

2008-07-02 Thread tolga . i . uzuner
First of all, I was not aware of the RSiteSearch function. Cool. Thanks for that. That having been said, I could not find anything here that helps with optimal lag selection. I can see: - grangertest, - granger.test and - the causality functions which actually implement the tests, but

[R] Combining playwith with par(mfrow... ) i.e., multiple plots.

2008-07-02 Thread Vorlow Constantinos
Hi, I have the following problem: library(playwith) x-ts(rnorm(100)) y-ts(cumsum(x)) playwith({ par(mfrow=c(2,1)) plot(x) plot(y)}) I can't make playwith identify (using the button top left) datapoints on multiple graph plots (eg. par(mfrow=c(2,2) for a 2 x

Re: [R] Help in using PCR

2008-07-02 Thread Gavin Simpson
On Wed, 2008-07-02 at 10:32 +0200, Bjørn-Helge Mevik wrote: Gavin Simpson [EMAIL PROTECTED] writes: Ok, lets sort this out. [Not tested as I don't have your data] df - data.frame(resp = cancerv1[, 408], VARS = as.matrix(cancerv1[, 2:407]) Actually, you _do_ need an

Re: [R] Sweave / Latex per-chapter output

2008-07-02 Thread Anne-Marie Ternes
Hello to all who have helped me on this topic, first I need to apologize for apparently replying only now... In fact I use the Pan Newsreader to read the list, and I posted a reply to the thread a week after your suggestions through Pan, and I only now realised that the posting never arrived on

Re: [R] W-E-I-R-D Weird!

2008-07-02 Thread Jim Lemon
On Wed, 2008-07-02 at 10:27 +1200, Rolf Turner wrote: On 2/07/2008, at 10:15 AM, Bert Gunter wrote: Ow ow ow. I can't stand it any longer! Weird is one of those weird exceptions in English to the i before e except after c rule and is spelled W-E-I-R-D . In case you're interested,

Re: [R] position legend below x-axis title

2008-07-02 Thread Gabor Grothendieck
The inset= argument to legend does not depend on usr coordinates. On Wed, Jul 2, 2008 at 5:41 AM, Anne-Marie Ternes [EMAIL PROTECTED] wrote: Dear helpers, I'm using a R script on several different datasets, which makes that axis scales may vary quite a lot from dataset to dataset. So what I'm

[R] how do I read only specific columns using read.csv or other read function

2008-07-02 Thread Philip James Smith
Hi R people: I have huge files with as many as 5000 columns. I'd really like to read only certain columns of those files. I know column names I want to read. I looked at the documentation of read.csv . Although there is a col.names option, it allows users to specify the names of the columns,

Re: [R] how do I read only specific columns using read.csv or other read function

2008-07-02 Thread Ben Tupper
On Jul 2, 2008, at 6:53 AM, Philip James Smith wrote: Hi R people: I have huge files with as many as 5000 columns. I'd really like to read only certain columns of those files. I know column names I want to read. I looked at the documentation of read.csv . Although there is a col.names

Re: [R] Help in using PCR

2008-07-02 Thread Bjørn-Helge Mevik
Gavin Simpson [EMAIL PROTECTED] writes: df - data.frame(resp = dat[,1], VARS = I(as.matrix(dat[, 2:101]))) class(df$VARS) [1] AsIs The class is AsIs for $VARS. But if I look at your yarn data set for example, the NIR component is of class matrix: class(yarn$NIR) [1] matrix How did you

Re: [R] W-E-I-R-D Weird!

2008-07-02 Thread Thomas Adams
And: Eight!!! (8) Rolf Turner wrote: On 2/07/2008, at 10:15 AM, Bert Gunter wrote: Ow ow ow. I can't stand it any longer! Weird is one of those weird exceptions in English to the i before e except after c rule and is spelled W-E-I-R-D . In case you're interested, the other exceptions are

Re: [R] W-E-I-R-D Weird!

2008-07-02 Thread Thomas Adams
Rolf, And what's even more weird, there is a 'weir' (pronounced just as 'weird', but without the 'd'), a structure over which water flows. All of this make good fodder for humorists… Cheers, Tom Thomas Adams wrote: And: Eight!!! (8) Rolf Turner wrote: On 2/07/2008, at 10:15 AM, Bert

[R] RES: bug in axis.Date? was (Re: newbie needs help plotting timeseries)

2008-07-02 Thread Leandro Marino
You can do this plot saying to R that your file is a time series with the ts() function. serie=ts(x,) and then you use plot(serie) -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de Petr PIKAL Enviada em: quarta-feira, 2 de julho de 2008 05:04 Para: Kathi

Re: [R] Plotting Bi-Gamma Distribution

2008-07-02 Thread Ben Bolker
Gundala Viswanath gundalav at gmail.com writes: Hi all, I've tried to plot a vector which has two peaks in the density. This link shows the figure. http://docs.google.com/View?docid=dcvdrfrh_1dk9r2rc7 The red line is normal curve and green line is gamma curve. Notice that red line

[R] conversion of data for use within barchart

2008-07-02 Thread Karin Lagesen
I have a data matrix like this: data[1:10,] aaname grp cluster count 1 Ala All Singleton 432 2 Arg All Singleton 1239 3 Asn All Singleton 396 4 Asp All Singleton 152 5 Cys All Singleton 206 6 Gln All Singleton 370 7 Glu All Singleton 211 8 Gly

[R] Correlation structures in gls with repeated measurements

2008-07-02 Thread t03eh7
Hi, I am trying include a spatial correlation structure into a gls model but keep getting the following error: ocean-read.table(C:\\oceanography2.txt,header=TRUE) library(nlme) YEAR-as.factor(ocean$YEAR) group-groupedData(san_dens~temp_grad*pyc_grad*start_thermo|YEAR,data=ocean)

Re: [R] dev.off() inside a function other glitches

2008-07-02 Thread Michael Hopkins
Thanks to all who replied on list and to me directly. You are right, FAQ 7.22 is the answer. For any others who get caught by this it's important to print(..) a plot with a function, not just create it, i.e. print( xyplot(... ) ) not just xyplot(... ) ..otherwise it

[R] FW: RES: bug in axis.Date? was (Re: newbie needs help plottingtimeseries)

2008-07-02 Thread Kurapati, Ravichandra (Ravichandra)
Instead of x-seq(as.Date(2004-01-01), as.Date(2008-06-01),by=month) from=iso2chron(2004-01-01) to= iso2chron(2008-06-01) from -chron2UTCsecs(from) to-chron2UTCsecs(to) delta##how many secs i.e month time in secs xx - seq(from=from, to=to, by=delta) x - UTCsecs2chron(xx) I think

[R] Can't install package Matrix on solaris.

2008-07-02 Thread Scott Brown
I'm using package Matrix, which I have installed on several flavours of linux system. But on an important solaris install, I can't make it work. Initially, I thought the problem was using 'make' instead of 'gmake', but I masked around that, and still get errors. Those new errors seem to be

Re: [R] Correlation structures in gls with repeated measurements

2008-07-02 Thread ONKELINX, Thierry
Emma, It looks like there is at least one location that has been sampled at least twice in some year. A co-worker of me got similar errors. After checking his data carefully he found a duplicate row. Removing the duplicate row solved his problem. HTH, Thierry

[R] Question about GCL function

2008-07-02 Thread Peter Flom
Hello again I recently downloaded the gcl package, which computes a fuzzy rules or tree classifier from data. It is very interesting and is giving good results. However, rather than return a list, it returns a function. Per the example in the documentation: library(gcl) library(datasets)

[R] Odp: RES: bug in axis.Date? was (Re: newbie needs help plotting timeseries)

2008-07-02 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 02.07.2008 14:17:00: You can do this plot saying to R that your file is a time series with the ts() function. serie=ts(x,) and then you use plot(serie) Yes and no. Of course that it can be plotted but the original problem was Error in axis(side, at

Re: [R] Optimal lag selection in Granger Causality tests

2008-07-02 Thread Matthieu Stigler
See function VARselect() in package vars which computes AIC and BC for each lag function ar() also computed VAR models with automatic selection of lags Mat First of all, I was not aware of the RSiteSearch function. Cool. Thanks for that. That having been said, I could not find anything

[R] Zoo plotting behavior

2008-07-02 Thread stephen sefick
I have a matrix with data that runs from 1/1/06 00:01:00-1/31/08 23:46:00. I have read in the data with this fmt.chron - function(x) { chron(sub( .*, , x), gsub(.* (.*), \\1:00, x)) } x - read.zoo(file.choose(), sep=,, header=T, FUN=fmt.chron) plotted with this plot(x[,(seq(3, by=9,

[R] Odp: FW: RES: bug in axis.Date? was (Re: newbie needs help plottingtimeseries)

2008-07-02 Thread Petr PIKAL
Hi Is it from chron package? As I do not have it available now I can not try it but the problem is not in plotting itself but in custom x axis labeling when there are missing date on either end of a series. You have several options Define fake time values for yet nonexisting data. Do your

[R] variable as part of file name

2008-07-02 Thread Laura Poggio
Dear all, sorry for this very basic question, but I did not find any good example yet. I would like to set up a variable that can be recall later to substitute a part of a file name. As example: var_filename = as.name(aaa) jpeg(var_filename.jpg) plot() dev.off() It would be very useful in

Re: [R] Zoo plotting behavior

2008-07-02 Thread stephen sefick
Like for instance that the xlim is small enough where the plot is showing the day instead of the year (I believe). Now that I have figured this out (I think). I would like to know if there is a way to tell plot.zoo how to print the date ranges easily. When I did the example in my previous email

Re: [R] variable as part of file name

2008-07-02 Thread Henrique Dallazuanna
Try this: sprintf(%s.jpg, var_filename) On Wed, Jul 2, 2008 at 10:31 AM, Laura Poggio [EMAIL PROTECTED] wrote: Dear all, sorry for this very basic question, but I did not find any good example yet. I would like to set up a variable that can be recall later to substitute a part of a file

[R] randomForest training error

2008-07-02 Thread Soumyadeep Nandi
While trying to train randomForest with my dataset, I am ending up with the following error Error in randomForest.default(datatrain, classtrain) : length of response must be the same as predictors My data looks like: A,B,C,D,Class 1,2,1,2,cl1 1,2,1,2,cl1 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2

Re: [R] Correlation structures in gls with repeated measurements

2008-07-02 Thread t03eh7
Thank you, it looks like that was the problem Emma Emma, It looks like there is at least one location that has been sampled at least twice in some year. A co-worker of me got similar errors. After checking his data carefully he found a duplicate row. Removing the duplicate row solved his

Re: [R] variable as part of file name

2008-07-02 Thread Laura Poggio
Thank you perfect! it worked also with the GDAL option. Laura 2008/7/2 Richard Pearson [EMAIL PROTECTED]: Laura Does jpeg(paste(var_filename, jpg, sep=.)) do what you want? Regards Richard Laura Poggio wrote: Dear all, sorry for this very basic question, but I did not find any good

[R] survival package test stats

2008-07-02 Thread Geoffrey Smith
Hello, Is there a function in the survival package that will allow me to test a subset of independent variables for joint significance? I am thinking along the lines of a Wald, likelihood ratio, or F-test. I am using the survreg procedure to estimate my parameters. Thank you. Geoff

Re: [R] A regression problem using dummy variables

2008-07-02 Thread rlearner309
I think the covariance between dummy variables or between dummy variables and intercept should always be zero. meaning: no sigularity problem?? rlearner309 wrote: This is actually more like a Statistics problem: I have a dataset with two dummy variables controlling three levels. The

Re: [R] Zoo plotting behavior

2008-07-02 Thread Gabor Grothendieck
?plot.zoo and the zoo faq vignette have examples of custom axes. In the case of chron, the axes are done by chron:::axis.times in the chron package. On Wed, Jul 2, 2008 at 9:32 AM, stephen sefick [EMAIL PROTECTED] wrote: Like for instance that the xlim is small enough where the plot is showing

Re: [R] Zoo plotting behavior

2008-07-02 Thread stephen sefick
one other thing- should I read the data in with the argument FUN=as.chron ? if this is the case how do I tell chron that the data is not in -mm-dd HH:MM:SS but in the format m/d/y HH:MM:SS ? thanks stephen On Wed, Jul 2, 2008 at 9:32 AM, stephen sefick [EMAIL PROTECTED] wrote: Like for

[R] Migrating from S-Plus to R - Exporting Tables

2008-07-02 Thread Leandro Marino
Hi, I want to export an table using the write.table and i want is this format: (this table was exported in s-plus) Q01 row.names Num Percmeabstdev min P5 P10 P25 P50 P75 P90 P95 max A 10237 47.88 183.48 38.84 86.98 126.52

[R] Problem reading from a data frame

2008-07-02 Thread naw3
Hi, I have a data frame with strings that have two letters and four numbers. When I store a whole row as a new vector and try to remove the preceding letters using the gsub command, it returns characters of single numbers that have no relation to the numbers in each string. I also noticed that

Re: [R] Zoo plotting behavior

2008-07-02 Thread stephen sefick
R 2.7.1 windows xp and version of zoo upgraded with new installation of R 2.7.1 yesterday from CA1 mirror window.zoo is not there? On Wed, Jul 2, 2008 at 10:00 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: ?plot.zoo and the zoo faq vignette have examples of custom axes. In the case of chron,

Re: [R] Zoo plotting behavior

2008-07-02 Thread Gabor Grothendieck
Seems to be there: library(zoo) methods(window) [1] window.default* window.ts* window.zoo* Non-visible functions are asterisked packageDescription(zoo)$Version [1] 1.5-2 On Wed, Jul 2, 2008 at 10:08 AM, stephen sefick [EMAIL PROTECTED] wrote: R 2.7.1 windows xp and version of zoo

Re: [R] Zoo plotting behavior

2008-07-02 Thread Gabor Grothendieck
Same with 1.5-3 methods(window) [1] window.default* window.ts* window.zoo* Non-visible functions are asterisked packageDescription(zoo)$Version [1] 1.5-3 R.version.string [1] R version 2.7.1 RC (2008-06-16 r45949) On Wed, Jul 2, 2008 at 10:31 AM, Gabor Grothendieck [EMAIL PROTECTED]

Re: [R] Problem reading from a data frame

2008-07-02 Thread Jorge Ivan Velez
Dear Nina, Is this what you want? x=c(MT2342,MT0982,MT2874) substr(x,3,nchar(x)) HTH, Jorge On Wed, Jul 2, 2008 at 10:24 AM, [EMAIL PROTECTED] wrote: Hi, I have a data frame with strings that have two letters and four numbers. When I store a whole row as a new vector and try to remove

Re: [R] A regression problem using dummy variables

2008-07-02 Thread Thomas Lumley
On Wed, 2 Jul 2008, rlearner309 wrote: I think the covariance between dummy variables or between dummy variables and intercept should always be zero. meaning: no sigularity problem?? No. You can easily check that this is not true using the cov() function. Indicator variables for mutually

Re: [R] Zoo plotting behavior

2008-07-02 Thread stephen sefick
sorry, I am still trying to figure R out. window worked just fine with chron, but when I use d - locator() as.chron(d) it returns results that are not consistent with the plot do I need to put in the format argument. I am still trying to figure out these date time classes. On Wed, Jul 2,

Re: [R] Zoo plotting behavior

2008-07-02 Thread Gabor Grothendieck
With that format you will need a custom function based on chron and sub as you were doing at the beginning. On Wed, Jul 2, 2008 at 9:53 AM, stephen sefick [EMAIL PROTECTED] wrote: one other thing- should I read the data in with the argument FUN=as.chron ? if this is the case how do I tell

Re: [R] variable as part of file name

2008-07-02 Thread Hans-Jörg Bibiko
On 02.07.2008, at 15:31, Laura Poggio wrote: Dear all, sorry for this very basic question, but I did not find any good example yet. I would like to set up a variable that can be recall later to substitute a part of a file name. As example: var_filename = as.name(aaa)

[R] Tobit Estimation with Panel Data

2008-07-02 Thread Arne Henningsen
Hi all! Do you know if there is any R function/package that can be used to estimate tobit models with panel data (e.g. with random individual effects)? In economics, a tobit model is a model with a dependent variable that is left-censored at zero. Hence, it is a special case of a survival

[R] Multiple time series plots

2008-07-02 Thread Kerpel, John
Hi all: I'm trying to plot two time series created in Rmetrics and label the x-axis with dates. I tried the following: dates - as.Date(seriesPositions(x.agg)) r - as.Date(range(dates)) ts.plot([EMAIL PROTECTED],c(1,5)],gpars=list(ylab=Volume, lty=c(1:2),xaxt=n,main=Plot of

Re: [R] Zoo plotting behavior

2008-07-02 Thread Gabor Grothendieck
I can't tell what you are doing from that description. See last line to every message to r-help. It should be possible to copy your code and just paste it into a running R session and see the problem If there is interaction give detailed descriptions. On Wed, Jul 2, 2008 at 10:42 AM, stephen

[R] log plots woes

2008-07-02 Thread Patrick Jackson
Hey Gang, Here is the situation. First of all I am a newbie, in the arena of R, so please bare with me. I am trying to make a plot with a series of plot lines that uses logs on the x axis, and when I plot it I am having a few odd things go on that I do not know how to correct. 1. the tick

Re: [R] passing a variable at the command line

2008-07-02 Thread Luke Tierney
commandArgs may do what you want. Best, luke On Tue, 1 Jul 2008, Erin Hodgess wrote: Dear R People: I have used ./R --no-save -q -f e.in stuff.out with great success on SUSE10.1 with R-2.7.1. My question is, please: is there a way to pass in a variable to the e.in file? I'm fairly sure

[R] Hmisc latex function with longtable option

2008-07-02 Thread Erik Iverson
Hello - I'm trying to use Hmisc's latex function to produce a postscript file of a data.frame, using the longtable = TRUE option. When I run, for example, ## sample R code dvips(latex(data.frame(a = rnorm(100), b = rnorm(100)), longtable = TRUE), file = test.ps) latex runs

[R] get formatted regression output

2008-07-02 Thread Bunny, lautloscrew.com
Hi everybody, I have a simple regression summary created by summary.lm and I wonder how i can export it to another file format which can be used on the web. .pdf would be possible, a html table would be nicer than your momma on your birthday. any suggestions ? thx so much in advance

[R] help on list comparison

2008-07-02 Thread Rajasekaramya
hi I want to compare two list by its names and get the values of that list. can anybody let me know the syntax of comparing the list by their names using a for loop c.genes- list() for(i in 1:100) c.genes[[1]]- geneset(which(geneset == tobecampared[i])) } here geneset is a list and also

[R] Sunset in Dortmund

2008-07-02 Thread Marc Schwartz
For those attending useR! 2008 next month, something to look forward to: http://www.gnome-look.org/content/show.php/show.php?content=84455 :-) Cheers, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Problem reading from a data frame

2008-07-02 Thread jim holtman
Seems to work fine for me: x - c(MT2342,MT0982,MT2874) gsub([^0-9], , x) [1] 2342 0982 2874 You might have 'factors' so you should use as.character to convert to character strings: gsub('[^0-9]','',as.character(PthwyGenes)) On Wed, Jul 2, 2008 at 10:24 AM, [EMAIL PROTECTED] wrote:

[R] auto.key in xyplot in conjunction with panel.text

2008-07-02 Thread David Afshartous
All, I can't seem to get auto.key to work properly in an xyplot that is employing panel.text. Specifically, I often change the default grouping colors then use auto.key accordingly, but for some reason the same functionality isn't working for this different type of plot. Any help much

Re: [R] get formatted regression output

2008-07-02 Thread Abhijit Dasgupta
library(Hmisc) has latex and html functions to convert the output into latex (then to pdf, if you wish), and into html. A useful link for this is http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/SweaveConvert Bunny, lautloscrew.com wrote: Hi everybody, I have a simple regression summary

Re: [R] Hmisc latex function with longtable option

2008-07-02 Thread Frank E Harrell Jr
Erik Iverson wrote: Hello - I'm trying to use Hmisc's latex function to produce a postscript file of a data.frame, using the longtable = TRUE option. When I run, for example, ## sample R code dvips(latex(data.frame(a = rnorm(100), b = rnorm(100)), longtable = TRUE), file =

Re: [R] Problem reading from a data frame

2008-07-02 Thread Marc Schwartz
Not likely the factor issue: x - factor(c(MT2342,MT0982,MT2874)) x [1] MT2342 MT0982 MT2874 Levels: MT0982 MT2342 MT2874 gsub([^0-9], , x) [1] 2342 0982 2874 gsub() and friends coerce to character internally already: gsub function (pattern, replacement, x, ignore.case = FALSE,

[R] error on predict

2008-07-02 Thread Michele Santacatterina
Hi, i have this glm: shuttle.glm.test - glm(cbind(r,m-r)~temperature,family=binomial,data=shuttle) and when i try to find a probability of var r (with temperature=31 and pressure=200): predict(shuttle.glm.test,data.frame(temperatura=31,pressure=200),type=response,se=T) i have this error:

Re: [R] Multiple time series plots

2008-07-02 Thread stephen sefick
have you tried package(zoo) it works very well and should do what you want On Wed, Jul 2, 2008 at 10:54 AM, Kerpel, John [EMAIL PROTECTED] wrote: Hi all: I'm trying to plot two time series created in Rmetrics and label the x-axis with dates. I tried the following: dates -

Re: [R] how do I read only specific columns using read.csv or other read function

2008-07-02 Thread Charles C. Berry
On Wed, 2 Jul 2008, Ben Tupper wrote: On Jul 2, 2008, at 6:53 AM, Philip James Smith wrote: Hi R people: I have huge files with as many as 5000 columns. I'd really like to read only certain columns of those files. I know column names I want to read. I looked at the documentation of

Re: [R] Multiple time series plots

2008-07-02 Thread Kerpel, John
Stephen: That works great - thanks! I have to admit it gets a little frustrating having to switch back and forth between packages because of cross-package incompatibility, but hey, more functionality = good. Best, john From: stephen sefick

[R] help appreciated to make a plot

2008-07-02 Thread Zheng Lu
Dear All: I have the following data: 0 100 0.5 79.9605 0.75 84.7098 1.5 72.1793 2.5 97.4924 4.5

[R] Goodness of fit test

2008-07-02 Thread martin . gaston
Dear R users, I have some data sets and I'd want to test if they are genarated under different probability functions. That is, some of them by gamma distribution, exponential one etc. Could anybody propose me any test (or procedure) to see that. I search something similar to the normality tests.

[R] graph woes

2008-07-02 Thread Patrick Jackson
Hey Gang, Here is the situation. First of all I am a newbie, in the arena of R, so please bare with me. I am trying to make a plot with a series of plot lines that uses logs on the x axis, and when I plot it I am having a few odd things go on that I do not know how to correct. 1. the tick

Re: [R] Multiple time series plots

2008-07-02 Thread Gabor Grothendieck
Incompatability? zoo can work with any date/time class that supports certain methods and such methods have specifically been written for fCalendar's timeDate class. In fact there is a section in vignette(zoo) on the timeDate class. Also we can readily convert between fSeries' timeSeries class

Re: [R] Sunset in Dortmund

2008-07-02 Thread Johannes Huesing
Marc Schwartz [EMAIL PROTECTED] [Wed, Jul 02, 2008 at 06:22:40PM CEST]: For those attending useR! 2008 next month, something to look forward to: http://www.gnome-look.org/content/show.php/show.php?content=84455 THIS is a sunset over Dortmund: http://www.23hq.com/mBusolt/photo/2230816 Deep

[R] exporting ftable

2008-07-02 Thread Leandro Marino
How can I export an ftable object in the same format that appears in R command window? For testing that i was using this example that is in help of this function. ## Start with a contingency table. ftable(Titanic, row.vars = 1:3) ftable(Titanic, row.vars = 1:2, col.vars = Survived)

Re: [R] Problem with strucchange package

2008-07-02 Thread Achim Zeileis
On Wed, 2 Jul 2008, [EMAIL PROTECTED] wrote: Dear R Users, I am attempting to use the strucchange package but get an error which is difficult to decipher. I get the following error with breakpoints: bp-breakpoints(regr[,1]~regr[,2]+regr[,3]) Error in my.RSS.table[as.character(i), 3:4] -

Re: [R] Sunset in Dortmund

2008-07-02 Thread Marc Schwartz
on 07/02/2008 02:37 PM Johannes Huesing wrote: Marc Schwartz [EMAIL PROTECTED] [Wed, Jul 02, 2008 at 06:22:40PM CEST]: For those attending useR! 2008 next month, something to look forward to: http://www.gnome-look.org/content/show.php/show.php?content=84455 THIS is a sunset over Dortmund:

Re: [R] help appreciated to make a plot

2008-07-02 Thread Gabor Grothendieck
Check out gap.plot in the plotrix package. On Wed, Jul 2, 2008 at 2:49 PM, Zheng Lu [EMAIL PROTECTED] wrote: Dear All: I have the following data: 0 100 0.5 79.9605 0.75 84.7098

Re: [R] exporting ftable

2008-07-02 Thread Henrique Dallazuanna
See ?write.ftable On Wed, Jul 2, 2008 at 4:56 PM, Leandro Marino [EMAIL PROTECTED] wrote: How can I export an ftable object in the same format that appears in R command window? For testing that i was using this example that is in help of this function. ## Start with a contingency

Re: [R] heatmap

2008-07-02 Thread Nair, Murlidharan T
I tried the following myself and I almost have something to work with. But I still need a little input. #Plots a filled contour # Can someone help me in increasing the resolution as my data range is 0-11? Also I need to put the row and column names on the axes. x - 1:nrow(data) y -

[R] Insert text in data.frame

2008-07-02 Thread Mafalda Viana
Dear R-helper, I wonder if anyone can help me. I am trying to convert a dataset to a format recognizable by a software onboard a research vessel but I am having problems with some steps. I have a data frame as follows: Conc Lat LonDepth Point 56.25-5.65

[R] Extracting regression coef. and p-values in JRClient

2008-07-02 Thread Amine Mohamed ROUANE HACENE
Hi there, I am using JRClient to build logistic regression model in the following manner : Rconnection c = new Rconnection(); c.eval(KSN-read.table(\/Users/amine/Documents/Research/ Tools/R/D2R1.txt\,header=T,sep=\,\)); c.eval(result - glm(Nausea ~ Kaletra*Sustiva,

[R] Extracting regression coef. and p-values in JRClient

2008-07-02 Thread Amine Mohamed ROUANE HACENE
Hi there, I am using JRClient to build logistic regression model in the following manner : Rconnection c = new Rconnection(); c.eval(KSN-read.table(\/Users/amine/Documents/Research/ Tools/R/D2R1.txt\,header=T,sep=\,\)); c.eval(result - glm(Nausea ~ Kaletra*Sustiva,

[R] Usage of rJava (.jcall) with Weka functions, any example?

2008-07-02 Thread Josep Maria Campanera Alsina
Dear All, I'd like to use Weka functions that are not implemented (do not have interface) in RWeka, like the Remove function and others in the future! The .java() functionality is for that purpose but I haven't seen any example with Weka functions. Could anyone give me hand in how to do it? For

[R] multiplication question

2008-07-02 Thread Murali Menon
folks, is there a clever way to compute the sum of the product of two vectors such that the common indices are not multiplied together? i.e. if i have vectors X, Y, how can i compute Sum (X[i] * Y[j]) i != j where i != j also, what if i wanted Sum (X[i] * Y[j] * R[i, j]) i != j

[R] Reading CSV file with unequal record length

2008-07-02 Thread Viswanathan Shankar
Hello , I am having some difficulty reading a CSV file of unequal record length in R . The data has 26 columns and do not have header and is generated from a R syntax - write.table(schat,schat.csv, sep=,, col.names=FALSE, append = TRUE)

Re: [R] Plotting Bi-Gamma Distribution

2008-07-02 Thread Wolfgang Raffelsberger
Hi, you can try the 'mixdist' package which allows fitting of multiple (superposed) distributions to your vector of data. The package is available on http://www.math.mcmaster.ca/peter/mix/mix.html Unfortunately this package doesn't support combination of normal with gamma etc..., but it

Re: [R] plot.zoo labels

2008-07-02 Thread ryan . sheftel
Thank you for your time to help. I don't think I was completely clear, I want to keep the axis ticks and labels (which I now see is what R calls the values like Jan, Feb, Mar) but want to suppress the label titles. So a generic plot(thisZoo) would produce a plot whose X axis is the dates, tick

[R] question on dispersion parameter

2008-07-02 Thread jpl
Hi, I'm programming in R and below is a summary of a generalized linear model: ** *** Call: glm(formula = offspring ~ degdays, family = quasi(link = log, variance = mu), data = fecundity) Deviance Residuals: Min 1Q Median 3Q Max -0.76674 -0.29117

Re: [R] multiplication question

2008-07-02 Thread Peter Alspach
Murali I don't know about 'clever', but does this do what you want? v1 - 1:3 v2 - 4:6 sum(matrix(rep(v1, length(v1)), nrow=length(v1))%*%v2)-sum(v1*v2) Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murali Menon Sent: Thursday, 3

Re: [R] multiplication question

2008-07-02 Thread Henrique Dallazuanna
Try something about like this: v1 %o% v2 - diag(v1*v2) On Wed, Jul 2, 2008 at 1:30 PM, Murali Menon [EMAIL PROTECTED] wrote: folks, is there a clever way to compute the sum of the product of two vectors such that the common indices are not multiplied together? i.e. if i have vectors X,

[R] NLME questions -- interpretation of results

2008-07-02 Thread Jenny Sun
My special thanks to Chunhao Tu for the suggestions about testing significance of two locations. I used logistic models to describe relationships between Y and X at two locations (A B). And within each location, I have four groups (N,E,S,W)representing directions. So the test data can be

Re: [R] conversion of data for use within barchart

2008-07-02 Thread Deepayan Sarkar
On 7/2/08, Karin Lagesen [EMAIL PROTECTED] wrote: I have a data matrix like this: data[1:10,] aaname grp cluster count 1 Ala All Singleton 432 2 Arg All Singleton 1239 3 Asn All Singleton 396 4 Asp All Singleton 152 5 Cys All Singleton 206 6

Re: [R] multiplication question

2008-07-02 Thread N. Lapidus
Hi Murali, Just an idea, probably not the best : x-1:4 y-1:6 z-matrix(1:(length(x)*length(y)),nrow=length(x)) I - matrix(1,nrow=length(x),ncol=length(y)) I[row(I)==col(I)] - 0 sum (outer (x, y, '*') * I) sum (outer (x, y, '*') * z * I) Hope this helps, Nael On Wed, Jul 2, 2008 at 6:30

Re: [R] Reading CSV file with unequal record length

2008-07-02 Thread Peter Dalgaard
Viswanathan Shankar wrote: Hello , I am having some difficulty reading a CSV file of unequal record length in R . The data has 26 columns and do not have header and is generated from a R syntax - write.table(schat,schat.csv, sep=,, col.names=FALSE, append = TRUE)

Re: [R] Accessing a field in a data fram

2008-07-02 Thread Marc Schwartz
on 07/02/2008 02:10 PM R_Learner wrote: raw - read.csv(file=filename, head=TRUE,sep=,) I've read in a csv file, and I'm looking to access a column whose name is held in a string. For example, I want to access raw$one or raw$two, but this will depending on the string. Let's say that the string

Re: [R] multiplication question

2008-07-02 Thread Henrique Dallazuanna
I'm sorry: sum(v1 %o% v2 - diag(v1*v2)) On Wed, Jul 2, 2008 at 6:03 PM, Henrique Dallazuanna [EMAIL PROTECTED] wrote: Try something about like this: v1 %o% v2 - diag(v1*v2) On Wed, Jul 2, 2008 at 1:30 PM, Murali Menon [EMAIL PROTECTED] wrote: folks, is there a clever way to compute

[R] set values in data.frame to NA conditional on another data.frame

2008-07-02 Thread Carson Farmer
Hello List, Is there a faster way to set values in one data.frame equal to NA conditional on the corresponding value in another data.frame? Currently I am using: b[is.na(a)] - NA where 'a' and 'b' are data.frames of equal size/dimensions, and 'a' contains NAs but 'b' does not. This is

  1   2   >