Re: [R] Help with scatterplots in R

2010-07-29 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.07.2010 18:13:57: > Hi John, > > yes, you are right. Here is what I have done: > > plot(DateJonEnd1, End1Jon, >main="Weekly Training at Endurance 1", xlim=c(13700,14750), xlab="Date", >ylim=c(0,350), ylab="Volume at Endurance 1", type="b",

[R] Odp: locator function and connecting segment

2010-07-29 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.07.2010 18:50:20: > Dear R People: > > I'm using the locator() function on a chart and I select two values. > > Is there a way already in place to connect the two values with a line > segment, please? I did this some time ago and put it to simple f

[R] R Equivalent of SAS Datastep Line-Hold (@@) Specifier?

2010-07-29 Thread Paul Miller
Hello Everyone,   Below is some SAS code that uses a "line hold specifier" to read multiple observations from each of several input lines of data. There are 3 patients per line in the in-stream data.   Is there a way in R to read this kind of data? I've looked in my books and online but haven't

[R] hi! l have a question please help me

2010-07-29 Thread leepama
1) dmatrix1<-function(n,p,rho,sigma,k){ muvec1=zeros(1,p) truep<-as.matrix(c(3,1.5,0,0,2,0,0,0)) A=eye(p) for(i in 1:p){ for(j in 1:p){ A[i,j]=rho^(abs(i-j)) X=mvrnorm(n,muvec1,A) y=X%*%truep+as.matrix(rnorm(n,0,sigma)) Y=X[1:k,] w=y[1:k] Z=X[(k+1):n,] z=y

[R] a Chebyshev ....really important

2010-07-29 Thread hussain abu-saaq
Hi. i have one question. is there any command to use a Chebyshev in R. i need them to fit the data and get a Chebyshev polynomial. thank you. I just need the command to fit. HI [[alternative HTML version deleted]] __

Re: [R] Accessing single element of data.frame

2010-07-29 Thread vacas
I am so thankful to Jannis and David for answering. Surely, it did work and I am thankful to you all. -- View this message in context: http://r.789695.n4.nabble.com/Accessing-single-element-of-data-frame-tp2302770p2307563.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Detecting seasonality

2010-07-29 Thread vikrant
Hi jannis, Thanks for replying I will try to make my question more clear. Actually I have many Hourly time series and I want to automatically detect whether seasonality is present in this series or not.If Yes, Then I need to find the period after which the seasonal pattern repeats. For this using

Re: [R] Unique rows in data frame (with condition)

2010-07-29 Thread Jorge Ivan Velez
Hi Ralf, Perhaps the following is what you are looking for: d <- data.frame(timestamp=c(3,3,3,5,8), mylabel=c("a","a","a","b","c")) d d[!duplicated(d$timestamp),] HTH, Jorge On Fri, Jul 30, 2010 at 12:18 AM, Ralf B <> wrote: > I have to deal with data frames that contain multiple entries of t

[R] Unique rows in data frame (with condition)

2010-07-29 Thread Ralf B
I have to deal with data frames that contain multiple entries of the same (based on an identifying collumn 'id'). The second collumn is mostly corresponding to the the id collumn which means that double entries can be eliminated with ?unique. a <- unique(data.frame(timestamp=c(3,3,3,5,8), mylabel=

Re: [R] Using R to fill ETM+ data gaps?

2010-07-29 Thread Thomas Juntunen
On Sat, 24 Jul 2010 17:03:44 -0400, Abdi, Abdulhakim wrote: > I was wondering if anyone knows of a method (or if it's possible) to use R in > interpolating Landsat ETM+ data gaps? I suggest using NASA's free software to fix your scenes: http://landsathandbook.gsfc.nasa.gov/handbook/software/gap

Re: [R] Trouble using grid.layout in Sweave

2010-07-29 Thread Paul Murrell
Hi On 27/07/2010 2:51 a.m., Sebastian Weber wrote: Hi! I am troubled by Sweave which I want to use in order to plot graphics which I build up successively by the use of grid.layout. Here is the code: <>= Is the problem just that you have specified "height=6in" rather than "height=6" ? i.e.

[R] logos and goodies

2010-07-29 Thread cgw
I've got a couple questions related to my search (in vain) for an "R" tshirt or coffee mug. The first question is simply: is there a higher-resolution R logo available than the one at r-developer.org? (or the modified one provided by useR conference pages) Next: what are the chan

Re: [R] how to find non-ASCII characters in .Rd files?

2010-07-29 Thread Steven McKinney
Does function showNonASCII(x) in package "tools" do what you need? Steven McKinney Statistician Molecular Oncology and Breast Cancer Program British Columbia Cancer Research Centre From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] O

[R] how to find non-ASCII characters in .Rd files?

2010-07-29 Thread Michael Friendly
[Env: Win XP Pro / R 2.11.1] I keep occasionally running into the annoying problem of getting warnings from R CMD check regarding non ASCII characters in .Rd files, without any easy way of finding them. Mostly these come from copy/paste of references or other material from web pages or Win ap

Re: [R] Windows Tile Vertically from Windows 7

2010-07-29 Thread Duncan Murdoch
On 29/07/2010 8:24 PM, Erin Hodgess wrote: Dear R People: Is there an "R equivalent" command for selecting the Tile Vertically option from the Windows toolbar, please? See ?arrangeWindows, but it's only in Windows, not other platforms. Duncan Murdoch _

[R] Windows Tile Vertically from Windows 7

2010-07-29 Thread Erin Hodgess
Dear R People: Is there an "R equivalent" command for selecting the Tile Vertically option from the Windows toolbar, please? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com _

Re: [R] How to run this video link

2010-07-29 Thread Jonathan Christensen
R is a program for doing statistics, not for playing videos. I recommend you try something else. Jonathan On Thu, Jul 29, 2010 at 10:43 AM, Velappan Periasamy wrote: > Pls tell me how to run this video in R > > http://nptel.iitm.ac.in/video.php?courseId=1083&p=4 > >

Re: [R] Using '[' as a function

2010-07-29 Thread Duncan Murdoch
On 29/07/2010 6:18 PM, chipmaney wrote: I am learning R, and instead of learning by rote, I am trying to better understand the language in order to improve my programming. So any "meta-information" on why the following code works would be greatly appreciated... I obtained this code to extract th

Re: [R] Linear Interpolation question

2010-07-29 Thread Gabor Grothendieck
On Thu, Jul 29, 2010 at 5:16 PM, Ralf B wrote: > Hi R experts, > > I have the following timeseries data: > > #example data structure > a <- c(NA,1,NA,5,NA,NA,NA,10,NA,NA) > c <- c(1:10) > df <- data.frame(timestamp=a, sequence=c) > print(df) > > where i would like to linearly interpolate between t

Re: [R] odd listing in R object

2010-07-29 Thread RICHARD M. HEIBERGER
Your colleagues was careless with back quotes. See ?'`' for a discussion of non-syntactic names. This next transcript shows how to use the back quote to create and then remove an object with a non-symantic name. > ?which > ?'`' > `females[\"dp\"]` <- 123 > ls(pat="fe") [1] "females[\"dp\"]" >

Re: [R] How to get the standard error from GEE(Generalized Estimation Equations) output

2010-07-29 Thread Jorge Ivan Velez
Hi there, You forgot to give us some detail, but here is my guess: install.packages('gee') require(gee) # fitting the model as in the help file under ?gee data(warpbreaks) fit <- gee(breaks ~ tension, id = wool, data = warpbreaks, corstr = "exchangeable") # extracting what you need summa

Re: [R] Sweaving quotes

2010-07-29 Thread Murray Jorgensen
I tried \usepackage[cp1252]{inputenc} and it works well, giving cursive directional quotes in the final document. Thank you Brian. I didn't find package ae on the Auckland CRAN mirror so I wonder if it is a LaTeX package. In any case I am happy now! Cheers, Murray Prof Brian Ripley wrote:

[R] Using '[' as a function

2010-07-29 Thread chipmaney
I am learning R, and instead of learning by rote, I am trying to better understand the language in order to improve my programming. So any "meta-information" on why the following code works would be greatly appreciated... I obtained this code to extract the first record from each of a series of v

[R] odd listing in R object

2010-07-29 Thread Lawrence Hanser
Dear R Colleagues, When I run ls() on an R object given to me by a colleague, one of the objects is shown literally as: "females[\"dp\"]" I can neither look into it nor can I get rid of it (rm("major[\"dp\"]"). Ideas or solutions? Thanks, Larry [[alternative HTML version deleted]] _

Re: [R] help splitting a data frame

2010-07-29 Thread Charles C. Berry
On Thu, 29 Jul 2010, kayj wrote: Hi All, I have a dataset that I would like to split based on : or – ( the data file is tab delimited) for example: Ny:23-45AC BA:88-91DB KJ:21-13PA And I would like the data to be splitted and the final results look like NY 23

[R] multiple graphics windows open with sessionInfo

2010-07-29 Thread Erin Hodgess
Dear R People: Hello again. I'm trying to have 3 graphics windows visible simultaneously. I set up a zoo series. Then I plot the original series. I use the locator function to select 2 values from the original series, which generates a subset of the original series. Next, I plot the subset. T

Re: [R] how to get higher derivatives with "deriv"

2010-07-29 Thread Wu Gong
## specify the function string f.str <- "x^alpha" ## higher derivatives DD <- function(f.str, x = 2, alpha=3,order = 1){ expr.s <- parse(text=f.str) while(order>=1) { expr.s <- D(expr.s,"x") order <- order-1} eval(expr.s) } compute DD(f.str,x=1,alpha=0.5,order=1) - A R learner. -- View th

Re: [R] reading dates in Excel into R

2010-07-29 Thread Peter Alspach
Tena koe What do you want to control? You can govern the format used in R using the appropriate R functions. I doubt it would be useful to have dates read from Excel depend on the format set for displaying those dates in Excel. HTH Peter Alspach > -Original Message- > From: r-h

Re: [R] looking for setdiff equivalent on dataset

2010-07-29 Thread Hadley Wickham
> Well, here's one way that "might" work (explanation below): > > The ideas is to turn each row into a character vector and then work with the > two character vectors. > >> bigs <- do.call(paste,TheBigOne) >> ix <-  which(bigs %in% setdiff(bigs,do.call(paste,TheLittleOne))) >> TheBigOne[ix,] > > Ho

[R] Linear Interpolation question

2010-07-29 Thread Ralf B
Hi R experts, I have the following timeseries data: #example data structure a <- c(NA,1,NA,5,NA,NA,NA,10,NA,NA) c <- c(1:10) df <- data.frame(timestamp=a, sequence=c) print(df) where i would like to linearly interpolate between the points 1,5, and 10 in 'timestamp'. Original timestamps should no

Re: [R] help splitting a data frame

2010-07-29 Thread stephen sefick
strsplit(s, split=":") anyhoo ?strsplit should get you started On Thu, Jul 29, 2010 at 1:34 PM, kayj wrote: > > Hi All, > > I have a dataset that I would like to split based on : or – ( the data file > is tab delimited) for example: > Ny:23-45        AC > BA:88-91        DB > KJ:21-13        P

Re: [R] help splitting a data frame

2010-07-29 Thread Henrique Dallazuanna
Try this: # Lines <- readLines('your_file') Lines <- "Ny:23-45AC BA:88-91DB KJ:21-13PA" DF <- read.table(textConnection(gsub("[-:]", "\t", Lines))) closeAllConnections() On Thu, Jul 29, 2010 at 2:34 PM, kayj wrote: > > Hi All, > > I have a dataset that I would like to

[R] How to get the standard error from GEE(Generalized Estimation Equations) output

2010-07-29 Thread ZZY ZYBOYS
I am having some difficulties to locate the standard error from GEE output. ---sample output using list (geemodel) Link: Identity Variance to Mean Relation: Gaussian Correlation Structure: Exchangeable Call: gee(formula = days.sick1 ~ bm

[R] help splitting a data frame

2010-07-29 Thread kayj
Hi All, I have a dataset that I would like to split based on : or – ( the data file is tab delimited) for example: Ny:23-45AC BA:88-91DB KJ:21-13PA And I would like the data to be splitted and the final results look like NY 23 45 AC BA 88 91

Re: [R] Help with scatterplots in R

2010-07-29 Thread Sarah Chisholm
Hi John, yes, you are right. Here is what I have done: plot(DateJonEnd1, End1Jon, main="Weekly Training at Endurance 1", xlim=c(13700,14750), xlab="Date", ylim=c(0,350), ylab="Volume at Endurance 1", type="b", las=1) Where DateJonEnd1 is the date of weekly Training, classified as "date" an

Re: [R] Reset R environment through R command

2010-07-29 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Ralf B > Sent: Thursday, July 29, 2010 10:27 AM > To: r-help@r-project.org > Subject: Re: [R] Reset R environment through R command > > With environment I actually meant workspac

Re: [R] looking for setdiff equivalent on dataset

2010-07-29 Thread Henrique Dallazuanna
Try this also: TheBigOne[rowSums(!mapply(is.element, TheBigOne, TheLittleOne)) > 0,] On Thu, Jul 29, 2010 at 3:38 PM, BaKaLeGuM wrote: > Hi everybody ! > > little question. > > I have 2 dataset > > TheLittleOne<-data.frame(cbind(c(2,3),c(2,3))) > TheBigOne<-data.frame(cbind(c(1,1,2),c(1,1,2)))

Re: [R] adding new devices and plots

2010-07-29 Thread Greg Snow
It is possible that the plot function starts to plot before the new device is fully in place, you could try sleeping for a second or 2 between the call to dev.new and the call to plot. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8

Re: [R] locator function and connecting segment

2010-07-29 Thread Greg Snow
Do you mean like: > plot(1:10) > locator(2, type='l') -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Erin

Re: [R] duplicates

2010-07-29 Thread Jannis
There is most probably a function doing exactly this, but i would give this solution a try: dataframe=dataframe[order(dataframe[,1],-dataframe[,2]),] kept.rows<-which(diff(dataframe[,1])+1 new.dataframe <- dataframe[kept.rows,] Dévaványai Agamemnón schrieb: Sorry! I try it again Dear R U

Re: [R] Beginner stucked with raster + geoR package.

2010-07-29 Thread Alaios
I would like to thank you for your kindness to help me. But I am not sure if temp <- grf(ncell(r), cov.pars=c(1, .25)) is correct as this will create around 64.000 locations (not sure what the parameter location is in grf package). Unfortunately it seems that I have a more serious problem when

Re: [R] Detecting seasonality

2010-07-29 Thread Jannis
Your question is really vague and it is hard to guess what you are after. And the possible answer is that a huge variety of methods exist, all designed for specific questions (that you did not specify). How about fourier transform? ?fft() Or SSA? library(simssalabim) Or the Hewitt test? I

Re: [R] Colour points in plot according to third variable

2010-07-29 Thread Jannis
check out the Plotrix package and the color.scale() or similar functions. Henrique Dallazuanna schrieb: Try this: library(RColorBrewer) plot(iris$Sepal.Length, col = as.character(cut(iris$Sepal.Length, c(4,6,7,8), labels = brewer.pal(3, 'Blues' On Thu, Jul 29, 2010 at 2:51 PM, Anna

Re: [R] Meaning of proc.time()

2010-07-29 Thread Christofer Bogaso
Ok, but what are "user CPU" and "system CPU?" If I know corrrectly, I only have a single CPU in my system. It is not a multi-corer system. Should I read that, system CPU time is the time that my CPU took for actual calculation, and the user CPU time is the time that my CPU took to analyze my code t

Re: [R] newton.method

2010-07-29 Thread Yihui Xie
The function newton.method() in the package 'animation' is merely for demonstration purpose instead of serious computation -- it illustrates how Newton's method works step by step. But I'm unable to reproduce your bogus results: library(animation) par(pch = 20) ani.options(nmax = 50, interval = 0.

[R] multiple graphics windows open

2010-07-29 Thread Erin Hodgess
Dear R People: Now I have a function with 3 graphics windows. I'd like for them all to be visible. However, the first window goes blank. Here is the basic setup. The first plot is the entire series. The user selects two points, which in turns generates a subset plot and an EWMA subset plot.

[R] Odp: Fwd: duplicates

2010-07-29 Thread Petr PIKAL
Hi rather complicated one liner assuming your data frame has name test do.call(rbind,lapply(split(test,test$var1), function(x) x[which.max(x[,"var2"]),])) Here it is in 3 lines test.s <- split(test,test$var1) # splits data frame result <- lapply(test.s, function(x) x[which.max(x[,"var2"]),]) #

Re: [R] newton.method

2010-07-29 Thread Berend Hasselman
sammyny wrote: > > > If someone could point me a correct working version of newton method for > finding roots and its usage, that would be helpful. > You mentioned in your original post that you had no idea how to use nleqslv. nleqslv provides a Broyden and Newton method with several differen

Re: [R] Residuals of mixed effects model

2010-07-29 Thread ONKELINX, Thierry
Dear Will, residuals() should take both the fixed and random effects into account. Can you give us a reproducible example if you get something different? Use residuals(model, type = "normalized") if you also want to account for the correlation structure. What do you want to do with the residuals

Re: [R] looking for setdiff equivalent on dataset

2010-07-29 Thread BaKaLeGuM
perfect ! thx ( I found prob::setdiff too.. but not really what i want) 2010/7/29 Hadley Wickham > Here's one way, using a function from the plyr package: > > TheLittleOne<-data.frame(cbind(c(2,3),c(2,3))) > TheBigOne<-data.frame(cbind(c(1,1,2),c(1,1,2))) > > keys <- plyr:::join.keys(TheBigO

Re: [R] looking for setdiff equivalent on dataset

2010-07-29 Thread Bert Gunter
Well, here's one way that "might" work (explanation below): The ideas is to turn each row into a character vector and then work with the two character vectors. > bigs <- do.call(paste,TheBigOne) > ix <- which(bigs %in% setdiff(bigs,do.call(paste,TheLittleOne))) > TheBigOne[ix,] However, this ma

Re: [R] looking for setdiff equivalent on dataset

2010-07-29 Thread Hadley Wickham
Here's one way, using a function from the plyr package: TheLittleOne<-data.frame(cbind(c(2,3),c(2,3))) TheBigOne<-data.frame(cbind(c(1,1,2),c(1,1,2))) keys <- plyr:::join.keys(TheBigOne, TheLittleOne) !(keys$x %in% keys$y) TheBigOne[!(keys$x %in% keys$y), ] Hadley On Thu, Jul 29, 2010 at 1:38

Re: [R] Different decimal places in a matrix

2010-07-29 Thread Ted Harding
On 29-Jul-10 09:25:37, Ted Harding wrote: > On 29-Jul-10 09:08:22, Nicola Sturaro Sommacal wrote: >> Hi! >> I have a ftable object in which some row contains integers and >> some other contains a percentage that I would like to show with >> two digits after the dot. >> >> I tried something like >>

Re: [R] package xpose4 in Vista - Update

2010-07-29 Thread Uwe Ligges
The binary package you downloaded is a binary for R < 2.11.x. Since it is a package bndle, it cannot work on R-2.11.x anymore: Package bundles are no longer supported. Best, Uwe Ligges On 29.07.2010 02:11, Santosh wrote: Dear R experts, There seems to be a problem (please see the error mess

[R] looking for setdiff equivalent on dataset

2010-07-29 Thread BaKaLeGuM
Hi everybody ! little question. I have 2 dataset TheLittleOne<-data.frame(cbind(c(2,3),c(2,3))) TheBigOne<-data.frame(cbind(c(1,1,2),c(1,1,2))) And I would like to obtain the TheBigOne - TheLittleOne (the row in TheBigOne not in TheLittleOne The result should be: cbind(c(1,1),c(1,1)) Have yo

Re: [R] Fry Plots

2010-07-29 Thread bbolker
[cc'ing back to r-help] At this point it sounds like you may need to poke around some more on your own -- I'm guessing you're not familiar with R. Reading through the various documentation on these packages (try help(package=...) to see if there is a vignette too) and/or the "Introduction to

[R] KLdiv question

2010-07-29 Thread Ralf B
I am having a data set that causes flexmix::KLdiv to produce NA as a result and I was told that increasing the sensitivity of the 'esp' value can be used to avoid a lot of values being set to a default (which presumably causes the problem). Now here my question. When running KLdiv on a normal dis

[R] adding new devices and plots

2010-07-29 Thread Erin Hodgess
Dear R People: I have the following function: > eplot function (x) { plot(x) z <- locator(2) dev.new() plot(window(x, start = min(z$x), end = max(z$x))) } > I want to generate a new plot from a subset of the original, but I want to keep the original plot up. When I use this, it

Re: [R] newton.method

2010-07-29 Thread sammyny
newton.method is in package 'animation'. Thanks Ravi. BBSolve/BBOptim seems to work very well although I am not familiar with the optimization methods being used there. Is there a way to specify a tolerance in the function to get the required precision. I did something like this to use newton m

Re: [R] Installing a newer version of a package - problems

2010-07-29 Thread Duncan Murdoch
On 29/07/2010 8:43 AM, Raghu wrote: Hi I am trying to install the latest version of the package quantstrat but I get the following error: install.packages("quantstrat", repos="http://R-Forge.R-project.org";) Warning in install.packages("quantstrat", repos = " http://R-Forge.R-project.org";) :

Re: [R] Colour points in plot according to third variable

2010-07-29 Thread Henrique Dallazuanna
Try this: library(RColorBrewer) plot(iris$Sepal.Length, col = as.character(cut(iris$Sepal.Length, c(4,6,7,8), labels = brewer.pal(3, 'Blues' On Thu, Jul 29, 2010 at 2:51 PM, Anna Berthinussen wrote: > Hi, > > I am using the plot function to make a simple plot of my data with one > var

Re: [R] fix()ing an S4 method

2010-07-29 Thread Uwe Ligges
No, I'd recommend to work with the sources directly, or if you really want to do it from command line, you can access with ?getMethod Uwe Ligges On 21.07.2010 14:36, Albert-Jan Roskam wrote: Hi R experts, The fix() function canbe used to edit normal functions. I would like to know whether it

[R] Colour points in plot according to third variable

2010-07-29 Thread Anna Berthinussen
Hi, I am using the plot function to make a simple plot of my data with one variable against another and want to colour the data points according to a third variable. The third variable is continuous (Time) and I want to try two different ways of colouring the data points, either: Divide t

Re: [R] R and WinBUGS (via R2WinBUGS) error

2010-07-29 Thread Uwe Ligges
Since this requert seems to be unanswered so far: On 19.07.2010 23:34, YL Grize wrote: Hi I have got the same error than you Who? This is a mailing list with thousands of readers ... had, calling BUGS from R with the bugs() function: / Error in FUN(X[[1L]], ...) : />/.C(..): 'type'

Re: [R] Reset R environment through R command

2010-07-29 Thread Stefan Grosse
Am Donnerstag, den 29.07.2010, 13:22 -0400 schrieb Ralf B: > Is it possible to remove all variables in the current environment > through a R command. > > Can one do that in R? see ?rm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] reading dates in Excel into R

2010-07-29 Thread Hongying Li
I am reading dates in Excel2007 into R. Here are the functions I used: library(RODBC) channel<-odbcConnectExcel2007("myfile.xlsx") tmp<-sqlFetch(channel,"1",as.is=T) The dates in myfile.xlsx are all in this format: mm/dd/. But when I read it to R, some columns look like "-mm-dd 00:00:

[R] Installing a newer version of a package - problems

2010-07-29 Thread Raghu
Hi I am trying to install the latest version of the package quantstrat but I get the following error: install.packages("quantstrat", repos="http://R-Forge.R-project.org";) Warning in install.packages("quantstrat", repos = " http://R-Forge.R-project.org";) : argument 'lib' is missing: using 'C:\

Re: [R] Reset R environment through R command

2010-07-29 Thread Henrique Dallazuanna
rm(list = ls(all = TRUE)) On Thu, Jul 29, 2010 at 2:26 PM, Ralf B wrote: > With environment I actually meant workspace. > > On Thu, Jul 29, 2010 at 1:22 PM, Ralf B wrote: > > Is it possible to remove all variables in the current environment > > through a R command. > > > > Here is what I want:

Re: [R] 3d data plot

2010-07-29 Thread Sarah Goslee
You don't really give a lot of information about exactly what you want. Some time spent browsing the R Graph Gallery at http://addictedtor.free.fr/graphiques/ might be helpful. Each plot has associated the code necessary to reproduce it. Especially look at the lattice and scatterplot3d sections. Yo

Re: [R] Reset R environment through R command

2010-07-29 Thread Ralf B
With environment I actually meant workspace. On Thu, Jul 29, 2010 at 1:22 PM, Ralf B wrote: > Is it possible to remove all variables in the current environment > through a R command. > > Here is what I want: > > x <- 5 > y < 10:20 > reset() > print(x) > print(y) > > Output should be NULL for x an

[R] Reset R environment through R command

2010-07-29 Thread Ralf B
Is it possible to remove all variables in the current environment through a R command. Here is what I want: x <- 5 y < 10:20 reset() print(x) print(y) Output should be NULL for x and y, and not 5 and 10:20. Can one do that in R? Best, Ralf __ R-help

Re: [R] Fry Plots

2010-07-29 Thread Ben Bolker
cassandra browne hotmail.com> writes: > > > Does anyone know how to do a fry plot in R? I have 600-800 points per image, and I really don't want to attempt > that manually. > > Thank you! > Cassie library(sos) ## you'll have to install this first findFn("fry plot") finds us

Re: [R] Help on installation of R Packages

2010-07-29 Thread Uwe Ligges
On 29.07.2010 15:34, Raghu wrote: Hi I tried installing the packages with: *install.packages("quantstrat", repos="http://R-Forge.R-project.org";) * *install.packages("blotter", repos="http://R-Forge.R-project.org";) **install.packages("FinancialInstrument", repos=" http://R-Forge.R-project.or

Re: [R] Crash report: projection pursuit & predict

2010-07-29 Thread Ben Bolker
Horace Tso pgn.com> writes: > I'm using 2.11.1 under the 32-bit Windows XP. I've also tested the > codes under a 64-bit Ubuntu and the same > problem occurred. By the way, right before Rgui shuts down, the \ > pop-up window suggests it's a runtime > error in C++. > > Here are the codes that ca

[R] Help on installation of R Packages

2010-07-29 Thread Raghu
Hi I tried installing the packages with: *install.packages("quantstrat", repos="http://R-Forge.R-project.org";) * *install.packages("blotter", repos="http://R-Forge.R-project.org";) **install.packages("FinancialInstrument", repos=" http://R-Forge.R-project.org";)* But non of these packages is ge

[R] Crash report: projection pursuit & predict

2010-07-29 Thread Horace Tso
Folks, The projection pursuit regression function in the base R seems to crash when the optimization level is set to zero, i.e. the initial ridge terms are accepted without refitting. I encountered this problem in an out-of-sample prediction exercise using predict. But further investigation sug

[R] 3d data plot

2010-07-29 Thread szisziszilvi
Hello! I'm a newbe, and a bit confused amongst the data types and functions... The problem to be solved is the following: We have measurements. They are in a csv file, in 3 columns. So this would be an x-y-z plot, where z is the measurement at (x,y) conditions. Just a simple plot, nothing specia

[R] locator function and connecting segment

2010-07-29 Thread Erin Hodgess
Dear R People: I'm using the locator() function on a chart and I select two values. Is there a way already in place to connect the two values with a line segment, please? Just thought I'd check before I started coding. Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor De

Re: [R] read.delim()

2010-07-29 Thread Ben Bolker
Doran, Harold air.org> writes: > > Thank you, Phil. Unfortunately, there are quotes used properly elsewhere. > - Original Message - > From: Phil Spector stat.berkeley.edu> > To: Doran, Harold > Cc: r-help r-project.org r-project.org> > Sent: Wed Jul 28 18:29:32 2010 > Subject: Re: [R

Re: [R] Fwd: duplicates

2010-07-29 Thread Wu Gong
Hi, Please try ?rle t.x <- x[order(x[,1],x[,2]),] t.x[cumsum(rle(t.x[,1])$lengths),] - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Fwd-duplicates-tp2306555p2306617.html Sent from the R help mailing list archive at Nabble.com. __

[R] How to run this video link

2010-07-29 Thread Velappan Periasamy
Pls tell me how to run this video in R http://nptel.iitm.ac.in/video.php?courseId=1083&p=4 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] Fry Plots

2010-07-29 Thread cassandra browne
Does anyone know how to do a fry plot in R? I have 600-800 points per image, and I really don't want to attempt that manually. Thank you! Cassie [[alternative HTML version deleted]] __ R-help@r-project.org

[R] how to get higher derivatives with "deriv"

2010-07-29 Thread Marius Hofert
Dear ExpeRts, I have trouble implementing a function which computes the k-th derivative of a specified function f and returns it as a function. I tried to adapt what I found under ?deriv but could not get it to work. Here is how it should look like: ## specify the function f <- function (x,al

Re: [R] Meaning of proc.time()

2010-07-29 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Christofer Bogaso > Sent: Thursday, July 29, 2010 7:51 AM > To: jim holtman > Cc: r-h...@stat.math.ethz.ch > Subject: Re: [R] Meaning of proc.time() > > Ok, but what are "user CP

Re: [R] New Open Source Community

2010-07-29 Thread Tal Galili
You mean along with: http://stats.stackexchange.com/ and http://metaoptimize.com/qa/ We have passed the online-over-proliferation stage for out topic of interest... :) Tal Contact Details:---

Re: [R] newton.method

2010-07-29 Thread Ravi Varadhan
Oops, it should have been: ans <- multiStart(par=p0.mat, fn=f) ans$par Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-

Re: [R] newton.method

2010-07-29 Thread Ravi Varadhan
Yes, there are two roots. Try this to get the 2 roots: require(BB) p0.mat <- matrix(rnorm(10), 10, 1) # 10 random starting values ans <- multiStart(par=p0, fn=f) ans$par You can see that the 2 roots are -2.438285 and 7.419378. Hope this helps, Ravi. __

Re: [R] Fwd: duplicates

2010-07-29 Thread ONKELINX, Thierry
Does this works? (Untested) library(plyr) ddply(your_dataframe, "var1", function(x){ x[which.max(x$var2), ] }) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek team Biometrie & Kwaliteitszorg Gaverstr

[R] duplicates

2010-07-29 Thread Dévaványai Agamemnón
Sorry! I try it again Dear R Users! I have a dataframe with duplicatecases. Var1 duplicated by var2. var1 var2 var3 var4 var5 14 500 12 13 200 25 18 125 19 22 120 252 2622 12

[R] [R-pkgs] heplots 0.9-3 and candisc 0.5-18 released to CRAN

2010-07-29 Thread Michael Friendly
I've just released the latest R-Forge versions of heplots 0.9-3 and candisc 0.5-18 to CRAN. They should appear there within a day or two. == heplots The heplots package provides functions for visualizing hypothesis tests in multivariate linear models (MANOVA, multivariate multiple regression, M

[R] Fwd: duplicates

2010-07-29 Thread Dévaványai Agamemnón
-- Eredeti üzenet -- Feladó: Dévaványai Agamemnón Címzett: r-...@r-project.org, r-...@r-project.orgelküldve: 2010. július 29. 16:29Tárgy : duplicates Sorry! I try it again Dear R Users! I have a dataframe with duplicatecases. Var1 duplicated by var2.

[R] Question about geoR package.

2010-07-29 Thread Alaios
Hello in geoR package there is a function called grf() According to the geoR short manual grf() takes the following arguments * n number of points (spatial locations) in each simulations. * grid optional. An n × 2 matrix with coordinates of the simulated data. * nx option

Re: [R] Displaying Counts of Unused Factors in Contingency Tables with table()

2010-07-29 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 29.07.2010 16:03:30: > Dennis, > > Thank you for your response. For clarification, I was not expecting > table() to divinely figure out the intent that I was making two levels > out of one (given my character vectors). Since table() is a generic >

[R] Odp: (no subject)

2010-07-29 Thread Petr PIKAL
Hi Your data came rather corrupted but probably you can split your data frame according to var1, select highest rank in var2 and reconstruct data frame from the result see split, lapply, Regards Petr r-help-boun...@r-project.org napsal dne 29.07.2010 15:48:26: > Dear R Users! > I ha

[R] Residuals of mixed effects model

2010-07-29 Thread will . eagle
Dear all, how do I get the residuals from a lme() output objects which are adjusted for fixed AND (!) random effects? I tried residuals(), but it seems they just give me the residuals adjusted for the fixed effects of the regression model. The model I use is: lme.out <- lme(data=MyDataInLongFo

Re: [R] Displaying Counts of Unused Factors in Contingency Tables with table()

2010-07-29 Thread ntyson
Dennis, Thank you for your response. For clarification, I was not expecting table() to divinely figure out the intent that I was making two levels out of one (given my character vectors). Since table() is a generic function that behaves differently with character and factor vectors, I n

[R] (no subject)

2010-07-29 Thread Dévaványai Agamemnón
Dear R Users! I have a dataframe with duplicate cases. Var1 duplicated by var2. var1var2 v

Re: [R] Statistical mailing list

2010-07-29 Thread Tal Galili
This is the new and exiting kid on the block: http://stats.stackexchange.com/ There is also: http://metaoptimize.com/qa For more "machine learning" type questions. Best, Tal Contact Details:---

Re: [R] Replace last element in a vector - elegant solution?

2010-07-29 Thread Wu Gong
Hi, The function head also works. x <- 1:10 head(x,-1) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Replace-last-element-in-a-vector-elegant-solution-tp2306315p2306471.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Help Creating a Stacked Bar Chart with Color Coding

2010-07-29 Thread Wu Gong
It is a little complicate for me to transform the table. Hope it works for you. x <- read.table(textConnection("Johnson 4 Smith4 Smith2 Smith3 Garcia 1 Garcia 4 Rodriguez 2 Adams 2 Adams 3 Adams 4 Turner 4 Turner 3 "),hea

  1   2   >