Re: [R] saving plots

2011-02-13 Thread km
Thanks! thats just what I was looking for! regards, KM On Mon, Feb 14, 2011 at 1:16 PM, Joel wrote: > > look at > > ?savePlot > > It will save the current plot you are viewing. > -- > View this message in context: > http://r.789695.n4.nabble.com/saving-plots-tp3304540p3304548.html > Sent from th

Re: [R] saving plots

2011-02-13 Thread Joel
look at ?savePlot It will save the current plot you are viewing. -- View this message in context: http://r.789695.n4.nabble.com/saving-plots-tp3304540p3304548.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

[R] saving plots

2011-02-13 Thread km
Hi all, Is there a way to save the currently displayed plot to an image format just after we view it? I think this would be more intuitive as a user if I wish to save it just after I visualize the plot. I am aware that we need to do some thing like this jpeg('somefilename.jpg') ... plot... comma

Re: [R] lattice auto.key gives mismatch colors

2011-02-13 Thread Deepayan Sarkar
On Fri, Feb 11, 2011 at 9:26 PM, John Smith wrote: > Hello All, > > I am using the following code to draw a figure. But the legend given buy > auto.key has mismatched colors. Could any one help me? See ?simpleTheme -Deepayan > I am using R2.12.1 and most current lattice on windows XP. > > Thank

Re: [R] Selecting particular rows in a table

2011-02-13 Thread Joshua Wiley
Hi, Well, how did you make that little 10 row sample for us? The same subsetting principles hold in R regardless of hugeness. I am kind of assuming you have a matrix or data frame class object, in which case, here is a little example for you: ## Big matrix dat <- matrix(1L, nrow = 134000, ncol

[R] Selecting particular rows in a table

2011-02-13 Thread kparamas
Hi, I have a huge table with 134,000 entries. I want to choose only rows 60,000 to 90,000. Please help me on how to do this. V1 V2 V3 V4 1 31.10267 168.3204 41 0.4 2 31.19941 168.1488 41 0.4 3 31.29580 167.9764 41 0.4 4 31.39183 167.8034 41 0.4 5 31.48750 167.6297 41 0.4 6

Re: [R] autocorrelaltion function plots

2011-02-13 Thread BSanders
I believe it's actually 2/sqrt(n) where n is the sample size... Interesting.. -- View this message in context: http://r.789695.n4.nabble.com/autocorrelaltion-function-plots-tp3303966p3304490.html Sent from the R help mailing list archive at Nabble.com. ___

[R] (no subject)

2011-02-13 Thread Smith, Taylor Taran
Hey, I am trying to graph a series of XY plots from a set of .csv files. Getting the csv files read in and the original plot set up is not a problem, but I cannot figure out a way to call get(iterator) within a separate dataset. A chunk of my code is below. data <- read.csv(file= filename) da

Re: [R] summing values for specific variables

2011-02-13 Thread Dennis Murphy
Hi: One (of many) ways is to use the aggregate() function in base R: df <- data.frame(g = rep(LETTERS[1:5], each = 5), y = rnorm(25)) aggregate(y ~ g, data = df, FUN = sum) g y 1 A -1.3165949 2 B 1.9850015 3 C -0.6460323 4 D -1.6459293 5 E 6.7001807 HTH, Dennis On Sun, Feb 13, 201

Re: [R] Optimal Y>=q cutoff after logistic regression

2011-02-13 Thread David Winsemius
On Feb 14, 2011, at 12:31 AM, Daniel Weitzenfeld wrote: Hi, I understand that dichotimization of the predicted probabilities after logistic regression is philosophically questionable, throwing out information, etc. But I want to do it anyway. I'd like to include as a measure of fit % of obse

[R] Optimal Y>=q cutoff after logistic regression

2011-02-13 Thread Daniel Weitzenfeld
Hi, I understand that dichotimization of the predicted probabilities after logistic regression is philosophically questionable, throwing out information, etc. But I want to do it anyway. I'd like to include as a measure of fit % of observations correctly classified because it's measured in units

[R] summing values for specific variables

2011-02-13 Thread Jonathan Salerno
This is a seemingly simple problem, but I'm unable to make any progress. I have a large dataset, within it there is a column of location names, some of which repeat; the adjacent column lists values for each location name. I need to sum the values which correspond to the same location name, retur

Re: [R] Newb Prediction Question using stepAIC and predict(), is R wrong?

2011-02-13 Thread BSanders
"So do not use '$' or '[..]' terms in model formulae - this is going to cause problems when it comes to predict, because your formula will not associate with the names it has in its formula in the new data frame. When you think about it, this is obvious. " I really don't understand why this is o

Re: [R] Test for equivalence

2011-02-13 Thread Albyn Jones
testing the null hypothesis of no interaction is not the same as a test of equivalence for the two differences. There is a literature on tests of equivalence. First you must develop a definition of equivalence, for example the difference is in the interval (-a,a). Then, for example, you

Re: [R] Help optimizing EMD::extrema()

2011-02-13 Thread William Dunlap
There are lots of modifications to make it faster. E.g., replace the call to 'sequence' by a call to 'Sequence' and define Sequence by Sequence <- function(nvec) { seq_len(sum(nvec)) - rep(cumsum(c(0L,nvec[-length(nvec)])), nvec) } That seemed to make the time for extrema(sample(-3:3,size=n,re

Re: [R] Help optimizing EMD::extrema()

2011-02-13 Thread Mike Lawrence
Wow, great work! This makes a huge difference (i.e. 5 mins to process an electrode instead of 5 hours). I believe that the ndata and ndatam1 are there to let EMD::emd() and EMD::extractimf() (the functions that call EMD::extrema()) implement various boundary corrections. I personally don't intend

Re: [R] From SPSS Syntax to R code

2011-02-13 Thread John
On Saturday, February 12, 2011 05:08:06 am beky wrote: > There is a code from SPSS Syntax > > do if sub(ATVK,2,2)="01". > comp strata=1. > else if sub(ATVK,2,2)>="05" and sub(ATVK,2,2)<="27". > comp strata=3. > else if sub(ATVK,4,2)>"20" or sub(ATVK,6,2)>"20". > comp strata=4. > else if sub(ATVK,4

Re: [R] Confidence interval

2011-02-13 Thread Joshua Wiley
Hi, The logical operators are actually vectorized, so I do not think you need a loop. Does this do what you want? ## Some data set.seed(10) dat <- matrix(rnorm(500, sd = 3), nrow = 80) ## Hypothetical confidence interval ci <- c(-5, 5) ## Find the number of points outside interval sum(dat < ci

[R] Confidence interval

2011-02-13 Thread Syd88
Hi, I am trying to determine how many points fall ouside the confidence interval range. This is the code I have so far but it does not work. Any help would be appreciated. Count <- vector () for (i in 1: nrow (dataname)){ if (dataname[i] u.ci.post[i]){ count[i] -> 1 }else {count[i] -> 0} } sy

Re: [R] String manipulation

2011-02-13 Thread Megh Dal
Hi Gabor, thanks (and Jim as well) for your suggestion. However this is not working properly for following string: > MyString <- "ABCFR34564IJVEOJC3434.36453" > strapply(MyString, "(\\D+)(\\d+)(\\D+)(\\d +)", c)[[1]] [1] "ABCFR" "34564" "IJVEOJC" "3434" Therefore there is decimal number in th

[R] how to overlay a map of US on image plot

2011-02-13 Thread cassie jones
Dear all, I have a data set which has latitude, longitude (not in increasing order) and observed precipitation corresponding to those locations. I am using image.plot command for that. But I want to overlay a map of US on that plot. I know we can use map('usa') to draw it, but I dont know how can

[R] Problems with tinnR editor

2011-02-13 Thread li li
Hi all, I have some problem with the tinnR editor. At each end of the line, there is a strange symbol and there is a dot between any two words. Does anyone know how to correct this? Thank you very much! Hannah [[alternative HTML version deleted]] ___

Re: [R] String manipulation

2011-02-13 Thread jim holtman
Just add '.' to the pattern specifier: > MyString <- "ABCFR34564IJVEOJC3434.16ABC123.456KJHLKJH23452345AAA" > # translate to the pattern sequences > x <- chartr('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.' + , '00111' + , MyString + ) > x.rl

Re: [R] Can not invoke maxent() of library(dismo) in GNU linux

2011-02-13 Thread al
Hello, I had the same problem with R 2.11. After upgrading to R 2.12 it worked. Hope it helps for you too. -- View this message in context: http://r.789695.n4.nabble.com/Can-not-invoke-maxent-of-library-dismo-in-GNU-linux-tp3242023p3304211.html Sent from the R help mailing list archive at Nabb

Re: [R] A Math question

2011-02-13 Thread David Winsemius
On Feb 13, 2011, at 4:47 PM, Maithula Chandrashekhar wrote: Dear all, I admit this is not anything to do R and even with Statistics perhaps. Strictly speaking this is a math related question. However I have some reasonable feeling that experts here would come up with some elegant suggestion to

Re: [R] String manipulation

2011-02-13 Thread Gabor Grothendieck
On Sun, Feb 13, 2011 at 4:42 PM, Megh Dal wrote: > Hi Gabor, thanks (and Jim as well) for your suggestion. However this is not > working properly for following string: > >> MyString <- "ABCFR34564IJVEOJC3434.36453" >> strapply(MyString, "(\\D+)(\\d+)(\\D+)(\\d+)", c)[[1]] > [1] "ABCFR"   "34564"  

Re: [R] Help optimizing EMD::extrema()

2011-02-13 Thread William Dunlap
I did not try to emulate the ndata nad ndatam1 arguments to extrema(), as I didn't see what they were for. The help file simply says they are the length of the first argument and that minus 1 and that is what their default values are. If they do not have their default values then extrema() freque

Re: [R] Help optimizing EMD::extrema()

2011-02-13 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Mike Lawrence > Sent: Friday, February 11, 2011 9:28 AM > To: r-h...@lists.r-project.org > Subject: [R] Help optimizing EMD::extrema() > > Hi folks, > > I'm attempting to use th

[R] A Math question

2011-02-13 Thread Maithula Chandrashekhar
Dear all, I admit this is not anything to do R and even with Statistics perhaps. Strictly speaking this is a math related question. However I have some reasonable feeling that experts here would come up with some elegant suggestion to my question. Here my question is: What is sum of all Integers?

Re: [R] packages that were removed from the CRAN repository

2011-02-13 Thread David Winsemius
On Feb 13, 2011, at 2:38 PM, Pavel Goldstein wrote: Hello , I have a general question: What does it means that a package was removed from the CRAN repository? There were problems in the package? It appears it may never have been on CRAN. There are other sources of packages: BioC, r-for

Re: [R] packages that were removed from the CRAN repository

2011-02-13 Thread David Winsemius
On Feb 13, 2011, at 2:38 PM, Pavel Goldstein wrote: Hello , I have a general question: What does it means that a package was removed from the CRAN repository? There were problems in the package? The CRAN Package Checks page may have the answer: I want to use 'mlice' package, but the pac

Re: [R] use map.axes for a projected map

2011-02-13 Thread sybil
Yeah, it works! I use lty=0 to suppress the grids. If I can get the longitude to display on the bottom instead of the top, i would be happier. But I am happy with it now. Thanks, -- View this message in context: http://r.789695.n4.nabble.com/use-map-axes-for-a-projected-map-tp3302918p3304067.h

[R] packages that were removed from the CRAN repository

2011-02-13 Thread Pavel Goldstein
Hello , I have a general question: What does it means that a package was removed from the CRAN repository? There were problems in the package? I want to use 'mlice' package, but the package doesn't exist in the CRAN now and I worry about... I will be very thankful for the answer! Pavel

Re: [R] markov-switching models

2011-02-13 Thread Ingmar Visser
typing 'markov switching' into the R site search box gives 127 results, certainly a few of which on the first page are possibly of interest to you. among them packages MSBVAR and bayesGARCH hth, best, Ingmar On Sat, Feb 12, 2011 at 12:53 PM, Nanda Mendez wrote: > > I'm looking for Markov switchi

[R] xyplot text sizing

2011-02-13 Thread Nick Torenvliet
Hi all, I'm using xyplot(closingDataXTS) To get a page with any number of seperate plots on it (as many plots as columns in closingDataXTS). Each plot is named according to colnames(closingDataXTS). I would like to control the size of the text each plot name appears in. I've seen a number of

[R] RCytoscape setPosition error

2011-02-13 Thread Fahim M
Hi Can some one please point out where i am wrong. I am trying to position set of nodes column-wise in cytoscape using RCytoscape AD BE CF --- g <- new ('graphNEL', edgemode='undirected') cw <- CytoscapeWindow ('smallExample', graph=RCytoscape::makeSimpleGraph()) layo

Re: [R] use map.axes for a projected map

2011-02-13 Thread Ray Brownrigg
Sybil: Have a look at ?map.grid for a start. You will need to fiddle if you really don't want the grid lines. HTH, Ray Brownrigg On Sun, 13 Feb 2011, sybil wrote: > Hi, > I am new to R and I want to display longitude and latitude for a projected > map. > map.axes won't do it since it only work

Re: [R] Removing elements from a vector matching a criteria, BUG in which() function

2011-02-13 Thread Rumen Kostadinov
Thanks Sarah, Yes, the function behaves Exactly as documented: check this out: > a = c(1,2,3,4,5) > a[which(a!=6)] [1] 1 2 3 4 5 > a[!which(a==6)] numeric(0) > a[-which(a==6)] numeric(0) > a[!a==6] [1] 1 2 3 4 5 I guess this is just a "gotcha", since I often use !which and -which to remove elem

[R] autocorrelaltion function plots

2011-02-13 Thread Fangyi He
Hi, all, I have a question on the "acf" function in time sereis analysis. After I run the function >acf(data); I got two blue lines above and below the x axis. I guess they are confidence inverval borders, right? Could someone tell me what the confidence level is for the blue lines? Is there some

Re: [R] String manipulation

2011-02-13 Thread jim holtman
If you have an indeterminate number of the patterns in the string, try the following: > MyString <- "ABCFR34564IJVEOJC3434" > # translate to the pattern sequences > x <- chartr('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + , '0011' + , MyString +

Re: [R] saturated model with a given umber of interaction effects

2011-02-13 Thread Peter Ehlers
On 2011-02-13 06:54, 7...@queensu.ca wrote: Hello I have the following model y ~ a + b + c + d + e + f I would like to look at all possible 3 way interaction, is it possible to do this without typing out each interaction manually? Is there some way to run a saturated model permitting only 2

Re: [R] String manipulation

2011-02-13 Thread Gabor Grothendieck
On Sun, Feb 13, 2011 at 10:27 AM, Megh Dal wrote: > Please consider following string: > > MyString <- "ABCFR34564IJVEOJC3434" > > Here you see that, there are 4 groups in above string. 1st and 3rd groups > are for english letters and 2nd and 4th for numeric. Given a string, how can > I separate ou

Re: [R] Removing elements from a vector matching a criteria, BUG in which() function

2011-02-13 Thread Sarah Goslee
If by "bug" you mean "function behaving exactly as documented." which() returns only the matches, the TRUE values. If there are no matches, it doesn't return anything. If I understand what you are trying to do, and I may not, a[which(a != 5)] is really what you want, and it is precisely to preser

Re: [R] Removing elements from a vector matching a criteria, BUG in which() function

2011-02-13 Thread Jeff Newmiller
I think your rewrite is overdue, because returning the array from the which function seems counterintuitive. --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Res

[R] Removing elements from a vector matching a criteria, BUG in which() function

2011-02-13 Thread Rumen Kostadinov
Dear all, I found a bug in the which() function. When trying to remove elements with the which function, if the criteria is not matched, numeric(0) is returned instead of the array itself. This is very weird. > a = c(1,2,3,4,5) > a[!a==6] [1] 1 2 3 4 5 > a[-which(a==6)] numeric(0) > a[-which(a=

[R] String manipulation

2011-02-13 Thread Megh Dal
Please consider following string: MyString <- "ABCFR34564IJVEOJC3434" Here you see that, there are 4 groups in above string. 1st and 3rd groups are for english letters and 2nd and 4th for numeric. Given a string, how can I separate out those 4 groups? Thanks for your time [[alternative

Re: [R] Question of "Quantile Regression for Longitudinal Data"

2011-02-13 Thread mirelleab
Quantile Regression for Longitudinal Data -- View this message in context: http://r.789695.n4.nabble.com/Question-of-Quantile-Regression-for-Longitudinal-Data-tp883458p3303675.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-p

Re: [R] Question of "Quantile Regression for Longitudinal Data"

2011-02-13 Thread mirelleab
How to interprete the results of panel data models of R? I estimate a adapted form of Koenker's (2004) suggestion for a quantile regression approach with panel data, for my data: rq.fit.panel <- function(X,Y,s,w,taus,lambda) { require(SparseM) require(quantreg) K <- length(w) if(K !=

[R] saturated model with a given umber of interaction effects

2011-02-13 Thread 7tmw
Hello  I have the following model y ~ a + b + c + d + e + f  I would like to look at all possible 3 way interaction, is it possible to do this without typing out each interaction manually? Is there some way to run a saturated model permitting only 2 and 3 way interactions (As opposed to consi

[R] BMS package and leading minor problems

2011-02-13 Thread Jukka Koskela
Hello, Could somebody please tell me what the following is about? I try to run BMS function for quite a small dataset (400 rows and 50 columns) to get model suggestions, but I end up getting following error message: bms<-bms(dat) Error in chol.default(XtX.start) : the leading minor of

Re: [R] From numeric vector to string vector

2011-02-13 Thread jim holtman
just using as.character does not add the leading/trailing zeros: > Vect <- c(12.234, 234.5675, 1.5) > as.character(Vect) [1] "12.234" "234.5675" "1.5" > On Sun, Feb 13, 2011 at 12:04 PM, Sascha Vieweg wrote: > On 11-02-13 10:48, David Winsemius wrote: > >> On Feb 13, 2011, at 10:43 AM, Bogaso

Re: [R] From numeric vector to string vector

2011-02-13 Thread Sascha Vieweg
On 11-02-13 10:48, David Winsemius wrote: On Feb 13, 2011, at 10:43 AM, Bogaso Christofer wrote: Hi there, I have a numeric vector let say: Vect <- c(12.234, 234.5675, 1.5) Now I want a string vector like: changedVec <- c("012.234", "234.568", "001.500") ?sprintf Just for my own un

Re: [R] Recoding using the memisc package

2011-02-13 Thread Peter Ehlers
On 2011-02-13 07:05, Shige Song wrote: Dear All, I am trying to recode a variable using the functions provided by "memisc" package. Actually I am following the examples on page 9-10 of the vignette: -- d.fig<- within(d.fig,

Re: [R] How to print and save simulated data?

2011-02-13 Thread Dieter Menne
wanfairos wrote: > > I have one problem to display my simulated data. Basically, I've generated > a set of rnorm (std.norm.mat)and rnbinom (gen.data) data to test on the > performance of FE Poisson model estimates > > ... Long self-contained example shorted > > my.data<-rep(,sim.size) >

Re: [R] How to print and save simulated data?

2011-02-13 Thread Dieter Menne
wanfairos wrote: > > I have one problem to display my simulated data. Basically, I've generated > a set of rnorm (std.norm.mat)and rnbinom (gen.data) data to test on the > performance of FE Poisson model estimates > > ... Long self-contained example shorted > > my.data<-rep(,sim.size) >

Re: [R] How to print and save simulated data?

2011-02-13 Thread Dieter Menne
wanfairos wrote: > > Dear members; > > I have one problem to display my simulated data. Basically, I've generated > a set of rnorm (std.norm.mat)and rnbinom (gen.data) data to test on the > performance of FE Poisson model estimates > > ... Long self-contained example shorted > > my.data<-rep

Re: [R] How to print and save simulated data?

2011-02-13 Thread Dieter Menne
wanfairos wrote: > > Dear members; > > I have one problem to display my simulated data. Basically, I've generated > a set of rnorm (std.norm.mat)and rnbinom (gen.data) data to test on the > performance of FE Poisson model estimates > > ... Long self-contained example shorted > > my.data<-rep

Re: [R] Recoding using the memisc package

2011-02-13 Thread Dieter Menne
Shige Song wrote: > > Dear All, > > I am trying to recode a variable using the functions provided by > "memisc" package. Actually I am following the examples on page 9-10 of > the vignette: > > -- > d.fig <- within(d.fig,{

Re: [R] From numeric vector to string vector

2011-02-13 Thread Peter Ehlers
On 2011-02-13 07:43, Bogaso Christofer wrote: Hi there, I have a numeric vector let say: Vect<- c(12.234, 234.5675, 1.5) Now I want a string vector like: changedVec<- c("012.234", "234.568", "001.500") Just for completeness, let's add formatC to your options: formatC( Vect, digits=3,

Re: [R] From numeric vector to string vector

2011-02-13 Thread jim holtman
Is this what you want: > Vect <- c(12.234, 234.5675, 1.5) > sprintf("%07.3f", Vect) [1] "012.234" "234.567" "001.500" > On Sun, Feb 13, 2011 at 10:43 AM, Bogaso Christofer wrote: > Hi there, I have a numeric vector let say: > > > > Vect <- c(12.234, 234.5675, 1.5) > > > > Now I want a string ve

Re: [R] From numeric vector to string vector

2011-02-13 Thread Dieter Menne
Bogaso wrote: > > Vect <- c(12.234, 234.5675, 1.5) > Now I want a string vector like: > changedVec <- c("012.234", "234.568", "001.500") > sprintf("%06.3f", c(12.234, 234.5675, 1.5)) Dieter -- View this message in context: http://r.789695.n4.nabble.com/From-numeric-vector-to-string-vector

Re: [R] From numeric vector to string vector

2011-02-13 Thread David Winsemius
On Feb 13, 2011, at 10:43 AM, Bogaso Christofer wrote: Hi there, I have a numeric vector let say: Vect <- c(12.234, 234.5675, 1.5) Now I want a string vector like: changedVec <- c("012.234", "234.568", "001.500") ?sprintf David Winsemius, MD West Hartford, CT _

[R] From numeric vector to string vector

2011-02-13 Thread Bogaso Christofer
Hi there, I have a numeric vector let say: Vect <- c(12.234, 234.5675, 1.5) Now I want a string vector like: changedVec <- c("012.234", "234.568", "001.500") Would be grateful if somebody help me how can I do that. Thanks and regards, [[alternative HTML version deleted

Re: [R] creating NAs for some values only

2011-02-13 Thread Bert Gunter
Daniel: 1. Please read up on how to create reproducible examples to post in R, e.g. via dput. What you inluded below is useless to reproduce your example. 2. If I understand you correctly, the trick here is to get the indices, e.g. with ?which: # First create an example: >mydata <- as.character

[R] Recoding using the memisc package

2011-02-13 Thread Shige Song
Dear All, I am trying to recode a variable using the functions provided by "memisc" package. Actually I am following the examples on page 9-10 of the vignette: -- d.fig <- within(d.fig,{ sev <- recode(sev, 1 ->

Re: [R] creating NAs for some values only

2011-02-13 Thread Sarah Goslee
Daniel, I think you might benefit from (re)reading the Intro to R materials, since you seem to misunderstand both ifelse() and possibly how subsetting works. I can't provide an actual example since I have no idea what sample or var or sm are (and it's a VERY good idea to not use names for variable

[R] creating NAs for some values only

2011-02-13 Thread Daniel M.
Hello, I have some data file, say, mydata 1,2,3,4,5,6,7 3,3,4,4,w,w,1 w,3,6,5,7,8,9 4,4,w,5,3,3,0 i want to replace some percentages of "mydata" file in to NAs for those values that are NOT w's. I know how to apply the percentage thing here but don't know how to select those values that are no

Re: [R] Test for equivalence

2011-02-13 Thread Mike Marchywka
> From: greg.s...@imail.org > To: ment...@gmx.net; r-help@r-project.org > Date: Sat, 12 Feb 2011 18:04:34 -0700 > Subject: Re: [R] Test for equivalence > > Does it make sense for you to combine the 2 data sets and do a 2-way anova > with treatment vs. control as one factor and experiment number a

Re: [R] Changes titles in ggplot2 plot

2011-02-13 Thread Shige Song
Dear Felipe, Thank you very much, this is exactly what I need (did find it in the ggplot2 book). Best, Shige On Sat, Feb 12, 2011 at 10:19 PM, Felipe Carrillo wrote: > you can just probably add > + labs(x="Time Elapsed,y="Predicted Probability") > > Felipe D. Carrillo > Supervisory Fishery Biol

Re: [R] calculate phase/amplitude of fourier transform function in R

2011-02-13 Thread Jose-Marcio Martins da Cruz
sammyny wrote: I did a fourier transform on a function in time domain to get the following functions in frequency domain (in latex): $Y_1[\omega] = \frac{1}{1-\phi_1 e^{-jw}}$ $Y_2[\omega] = \frac{1}{1-(\phi_1 + \phi_2)e^{-jw} +\phi_1\phi_2e^{-2jw}}$ How do I find the spectrum of this functio

Re: [R] From SPSS Syntax to R code

2011-02-13 Thread Sascha Vieweg
On 11-02-12 05:08, beky wrote: There is a code from SPSS Syntax do if sub(ATVK,2,2)="01". comp strata=1. else if sub(ATVK,2,2)>="05" and sub(ATVK,2,2)<="27". comp strata=3. else if sub(ATVK,4,2)>"20" or sub(ATVK,6,2)>"20". comp strata=4. Note that your first statement is overwritten by the on