Re: [R] pam() seems to ignore cluster number

2011-05-23 Thread Martin Maechler
> Dario Strbenac > on Wed, 18 May 2011 12:00:11 +1000 writes: > I am using PAM with k = 10 clusters, but I only get one cluster > ID for all my observations. I couldn't find any discussion about > this in the help file, or mailing lists. Is there a reasonable > explan

Re: [R] histogram with density

2011-05-23 Thread Steve Lianoglou
On Tue, May 24, 2011 at 12:31 AM, Rekha wrote: > S . Am getting error still now if i use both version of the codes . > > i have to call any library? No. The code you've written here doesn't require loading any other R libraries. Please copy and paste the exact code you've entered along with the

Re: [R] histogram with density

2011-05-23 Thread Rekha
S . Am getting error still now if i use both version of the codes . i have to call any library? On Tue, May 24, 2011 at 9:22 AM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > Hi, > > On Mon, May 23, 2011 at 11:41 PM, Rekha wrote: > > Hello All,* > > > > *I want to draw a histogram

Re: [R] days between dates

2011-05-23 Thread Ian Gow
Geoffrey: There may be something for this in one of the packages dealing with dates. If not, here's one (incomplete) idea, based on something I used for a similar issue a little while ago. Essentially, make a data frame that ranks each weekday over a period in ascending order. This data frame

[R] BiodiversityR GUI error message

2011-05-23 Thread Gábor Pozsgai
Dear List, I have just got a laptop with win 7 64 bit installed on it. I installed R and quite a few packages I use. When I try to start BiodiversityR the library loads without any problems but when starting the GUI it gives me the following error message: Sourced: BiodiversityGUI.R Error : .onAt

Re: [R] Passing function arguments to dataset names

2011-05-23 Thread MatAra
Janko, Thanks a lot for your reply. Option 2 is exactly what I was looking for. Mil gracias! Mateo -- View this message in context: http://r.789695.n4.nabble.com/Passing-function-arguments-to-dataset-names-tp3545567p3545741.html Sent from the R help mailing list archive at Nabble.com.

[R] panel.first problem when plotting with formula

2011-05-23 Thread Gene Leynes
I wrote a little function called bgfun that adds gridlines and a background, but it's not working with I plot using the formula. I have some theories on what's happening, but even if my theory is right, I don't know how to fix it. Someone have a straightforward silver bullet? Thank you, Gene

Re: [R] Reading Data from mle into excel?

2011-05-23 Thread Scott Chamberlain
I would read the datasets into a list first, something like this which will make a list of dataframes: filenames <- dir() # where only filenames you want to read in are in this directory dataframelist <- lapply(filenames, read.csv, header = TRUE, sep = ",") You should be able to put the whol

Re: [R] Reading Data from mle into excel?

2011-05-23 Thread Hugh Patience
Hi Scott, Thanks for this. Got some questions below: Thanks Hugh Date: Mon, 23 May 2011 17:32:52 -0500 From: scttchamberla...@gmail.com To: h_a_patie...@hotmail.com CC: r-help@r-project.org Subject: Re: [R] Reading Data from mle into excel? I would read the datasets into a list fir

[R] Problem running maxLik on R

2011-05-23 Thread Subhra Bhattacharjee
I am trying to implement a maximum likelihood estimation using maxLik but keep getting this message "Error in is.function(func) : 'func' is missing" I am new to R and cannot figure out what's wrong. Any advice will be much appreciated. Thanks [[alternative HTML version deleted]]

Re: [R] histogram with density

2011-05-23 Thread Steve Lianoglou
Hi, On Mon, May 23, 2011 at 11:41 PM, Rekha wrote: > Hello All,* > > *I want to draw a histogram with density curve. * > > *For that simply i created a data called*"x" *and i used the function called > *    hist(x, col = "blue", freq = FALSE),**   *from this function i got a > histogram*. > > *Af

[R] histogram with density

2011-05-23 Thread Rekha
Hello All,* *I want to draw a histogram with density curve. * *For that simply i created a data called*"x" *and i used the function called *hist(x, col = "blue", freq = FALSE),** *from this function i got a histogram*. *After that , i tried this function* ** lines(density(x), col = "red",

Re: [R] Apply or Tapply to Build Set of Tables

2011-05-23 Thread Dennis Murphy
Hi: Here's one way to do the pairwise tables. I'm restricting attention to the variables with only a few levels, but the idea should be clear enough. # Put the variable names into a vector vars <- names(infert)[c(1, 3:6)] # Use expand.grid() to generate all pairs of variables # It's important to

Re: [R] How do I assign boolean (o,1) values to a column?

2011-05-23 Thread Steve Lianoglou
Hi CAR, On Mon, May 23, 2011 at 10:52 AM, CAR wrote: > Hi everybody!! > > I'm trying to assign boolean values to a column in a matrix depending on the > number of times present in another column. I have no clue, I have been 2 > days looking for a way, if somebody knows what kind of functions I ne

Re: [R] Reading Data from mle into excel?

2011-05-23 Thread Rolf Turner
I think cognizance should be taken of fortune("very uneasy"). cheers, Rolf Turner __ 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-guid

Re: [R] Reading Data from mle into excel?

2011-05-23 Thread Dennis Murphy
Hi: This isn't too hard to do. The strategy is basically this: (1) Create a list of file names. (See ?list.files for some ideas) (2) Read the data files from (1) into a list. (3) Create a function to apply to each data frame in the list. (4) Apply the function to each data frame. (5) Extract the

Re: [R] Apply or Tapply to Build Set of Tables

2011-05-23 Thread Jim Holtman
untested x <- lapply(names(infert),function(a)table(infert[[a]])) extend this to the rest of your problem. Sent from my iPad On May 23, 2011, at 20:33, "Sparks, John James" wrote: > Dear R Helpers, > > First, I apologize for asking for help on the first of my topics. I have > been looking a

[R] Apply or Tapply to Build Set of Tables

2011-05-23 Thread Sparks, John James
Dear R Helpers, First, I apologize for asking for help on the first of my topics. I have been looking at the posts and pages for apply, tapply etc, and I know that the solution to this must be ridiculously easy, but I just can't seem to get my brain around it. If I want to produce a set of table

[R] Apply or Tapply to Build Set of Tables

2011-05-23 Thread Sparks, John James
Dear R Helpers, First, I apologize for asking for help on the first of my topics. I have been looking at the posts and pages for apply, tapply etc, and I know that the solution to this must be ridiculously easy, but I just can't seem to get my brain around it. If I want to produce a set of table

Re: [R] Analog of least significant difference error bars for proportions

2011-05-23 Thread Rolf Turner
On 24/05/11 11:23, Richard Friedman wrote: > Dear R-list, > > In the R-book, p.464, Michael Crawley recommends that error > bars for bar plots of normally distributed continuous response > variables with categorical explanatory variables be given by > 1/2 of the least significant difference, wh

[R] Analog of least significant difference error bars for proportions

2011-05-23 Thread Richard Friedman
Dear R-list, In the R-book, p.464, Michael Crawley recommends that error bars for bar plots of normally distributed continuous response variables with categorical explanatory variables be given by 1/2 of the least significant difference, where the least significant difference is defines a

Re: [R] Applying boxplot.stats to multiple value lists

2011-05-23 Thread Peter Ehlers
On 2011-05-23 07:40, Rashid Bakirov wrote: Hello all R gurus, I have a following problem which I hope someone will help me to solve. I have a data.frame in form similar to below. testframe<-data.frame("Name"=c("aa","aa","aa","aa","aa","bb","bb","bb","bb","bb"),"Value"=c(1,100,1,1,1,100,10

Re: [R] denoting post-hoc test differences using letters

2011-05-23 Thread Dennis Murphy
Hi: Perhaps the cld() function in the multcomp package is what you're looking for. Dennis On Mon, May 23, 2011 at 9:40 AM, Adrienne Keller wrote: > Is there code in R to automatically assign letters to different groups that > are found to be statistically significant using a post-hoc test follo

Re: [R] Passing function arguments to dataset names

2011-05-23 Thread Janko Thyson
Hi Mateo, not sure if I totally get what you're after, but maybe this helps: SharpeRatio.annualized <- function(roc){ print("I'm computing the Sharpe Ratio") return() } MyF <- function(Tic, price){ print("Option 1") expr <- expression(Ratio.Tic <- SharpeRatio.annualized(ro

Re: [R] FW: getting time series into r

2011-05-23 Thread Gabor Grothendieck
On Mon, May 23, 2011 at 4:05 PM, Heiman, Thomas J. wrote: > Hi, > > I tried to attach these files before as .csv and they did not go through.. > This time they are .txt files..  I am trying to get the attached following > two timeseries (these are small subsets of the whole thing) into R so I ca

Re: [R] debug R device plot

2011-05-23 Thread Sharpie
cameron.bracken wrote: > > You need to look for a file (it may not be in your project directory) that > contains "___LOCK" in its file name and delete it. > Specifically, the rogue lockfile should be in the same directory as options('tikzMetricsDictionary'). Or, if you haven't set a permanent l

Re: [R] predict a MA timeseries

2011-05-23 Thread Rolf Turner
On 24/05/11 01:24, user84 wrote: Hi, could anyone tell me how predict() predicts the new value(s), of a MA(1) arima-modell. its really easy to make it with an AR(1), knowing the last term, but how can i or R know the last error? I think what you're asking here is this: Suppose X_t = a_t +

[R] Error in backSpline.npolySpline(sp) : spline must be monotone

2011-05-23 Thread Bazman76
I get the following error: Error in backSpline.npolySpline(sp) : spline must be monotone Has anyone had this error before? any ideas on a workaround? > > vols=read.csv(file="C:/Documents and Settings/Hugh/My > Documents/PhD/Swaption vols.csv" + , header=TRUE, sep=",") > X<-ts(vols[,2]) > #X >

[R] Passing function arguments to dataset names

2011-05-23 Thread MatAra
Hello, I am stuck in a relatively simple procedure and was wondering if anybody knows the answer. I am a relatively new R user. How do I use an argument of a custom function in the name of a dataset in R? For example, I have the function: MyF <- function(Tic, price){ x

[R] Reading Data from mle into excel?

2011-05-23 Thread Bazman76
Hi there, I ran the following code: vols=read.csv(file="C:/Documents and Settings/Hugh/My Documents/PhD/Swaption vols.csv" , header=TRUE, sep=",") X<-ts(vols[,2]) #X dcOU<-function(x,t,x0,theta,log=FALSE){ Ex<-theta[1]/theta[2]+(x0-theta[1]/theta[2])*exp(-theta[2]*t) Vx<-theta[3]^2*(1-exp(-2*t

Re: [R] debug R device plot

2011-05-23 Thread cameron.bracken
Not sure if you ever figured this out, but I was just directed to this post. You need to look for a file (it may not be in your project directory) that contains "___LOCK" in its file name and delete it. filehash creates this to prevent multiple writes to the same file at the same time and somehow

Re: [R] How do I assign boolean (o,1) values to a column?

2011-05-23 Thread Xenimes
Thanks for the tip!!! I read the R manual and some other basic helps. The problem here is I dont know even the name of what I´m looking for -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-assign-boolean-o-1-values-to-a-column-tp3544304p3545484.html Sent from the R hel

Re: [R] Formatting names.arg

2011-05-23 Thread Marc Schwartz
On May 23, 2011, at 4:31 PM, David Winsemius wrote: > > On May 23, 2011, at 4:32 PM, Marc Schwartz wrote: > >> On May 23, 2011, at 3:13 PM, Adrienne Keller wrote: >> >>> I am making a barplot using barplot2 from gplots and would like to >>> format the names of my categorical variables (tree spe

Re: [R] Formatting names.arg

2011-05-23 Thread David Winsemius
On May 23, 2011, at 4:32 PM, Marc Schwartz wrote: On May 23, 2011, at 3:13 PM, Adrienne Keller wrote: I am making a barplot using barplot2 from gplots and would like to format the names of my categorical variables (tree species) on the x- axis so that the genus name is above the species name

Re: [R] FW: getting time series into r

2011-05-23 Thread David Winsemius
On May 23, 2011, at 5:16 PM, David Winsemius wrote: On May 23, 2011, at 4:31 PM, Ben Bolker wrote: Heiman, Thomas J. mitre.org> writes: tmp <- read.table("baltimore.csv", sep = " ") ##This is timeseries 2 z <- zoo(tmp[, 2:20], as.Date(as.character(tmp[, 1]), format = )) In this file you

[R] Latent class analysis, selection of the number of classes

2011-05-23 Thread Daniel Malter
Hi, I perform latent class analysis on a matrix of dichotomous variables to create an indicator of class/category membership for each observation. I would like to know whether there is a function that selects the best fit in terms of number of classes/categories. Currently, I am doing this with t

Re: [R] FW: getting time series into r

2011-05-23 Thread David Winsemius
On May 23, 2011, at 4:31 PM, Ben Bolker wrote: Heiman, Thomas J. mitre.org> writes: tmp <- read.table("baltimore.csv", sep = " ") ##This is timeseries 2 z <- zoo(tmp[, 2:20], as.Date(as.character(tmp[, 1]), format = )) In this file you have no separators in the dates so the format would

Re: [R] Formatting names.arg

2011-05-23 Thread Ben Bolker
Adrienne Keller umontana.edu> writes: > I am making a barplot using barplot2 from gplots and would like to > format the names of my categorical variables (tree species) on the x- > axis so that the genus name is above the species name (to save room). > My code so far is: [snip] Try "Dia

Re: [R] FW: getting time series into r

2011-05-23 Thread Ben Bolker
Heiman, Thomas J. mitre.org> writes: > tmp <- read.table("baltimore.csv", sep = " ") ##This is timeseries 2 > z <- zoo(tmp[, 2:20], as.Date(as.character(tmp[, 1]), format = "%y %m %d")) > > tmp1 <- read.table("baltimorefludata.csv", sep = " ") ##This is timeseries 1 > z2 <- zoo(tmp[,2], as.Date(

Re: [R] Formatting names.arg

2011-05-23 Thread Marc Schwartz
On May 23, 2011, at 3:13 PM, Adrienne Keller wrote: > I am making a barplot using barplot2 from gplots and would like to > format the names of my categorical variables (tree species) on the x- > axis so that the genus name is above the species name (to save room). > My code so far is: > > sp

Re: [R] Looping through values in a data frame that are >zero

2011-05-23 Thread Dimitri Liakhovitski
Thank you very much, everyone! Extremely helpful! I really liked these two solutions: # reshape is really cool + it gives me the value I need! library(reshape2) solution1<-subset(melt(x, id = c('y', 'z')), value > 0) # This one is also very good, just need one additional loop - to include variab

Re: [R] What are the common Standard Statistical methods used for the analysis of a dataset

2011-05-23 Thread Ben Bolker
Ramnath R gmail.com> writes: > > Hi, > > Anybody know what are the common Standard statistical methods used for the > analysis of a dataset,and > anybody know which of these methods give similar results > Sorry, but this question is the statistical equivalent of "how long is a piece of stri

[R] Formatting names.arg

2011-05-23 Thread Adrienne Keller
I am making a barplot using barplot2 from gplots and would like to format the names of my categorical variables (tree species) on the x- axis so that the genus name is above the species name (to save room). My code so far is: speciesnames<-c("Dialium guianensis", "Inga alba", "Tachigali ver

Re: [R] getting time series into r

2011-05-23 Thread Andy Zhu
No attachment.  But if your date is in the MMDD then the format syntax is ...format="%Y%m%d"). Best, --- On Mon, 5/23/11, Heiman, Thomas J. wrote: From: Heiman, Thomas J. Subject: [R] getting time series into r To: "R-help@r-project.org" Date: Monday, May 23, 2011, 2:32 PM Hi, I am tr

[R] FW: getting time series into r

2011-05-23 Thread Heiman, Thomas J.
Hi, I tried to attach these files before as .csv and they did not go through.. This time they are .txt files.. I am trying to get the attached following two timeseries (these are small subsets of the whole thing) into R so I can merge them using zoo. tmp <- read.table("baltimore.csv", sep = "

Re: [R] getting time series into r

2011-05-23 Thread Heiman, Thomas J.
Hi David, I have attached them to this note as .txt files.. Sorry about that.. Sincerely, tom Thomas Heiman, PhD Info Systems Eng, Sr The MITRE Corporation | Center for Enterprise Modernization Office: 703-983-2951 | thei...@mitre.org -Original Message- From: David Winsemius [mailto:

[R] DCC-GARCH model

2011-05-23 Thread Marcin P?�ciennik
Hello, I have a few questions concerning the DCC-GARCH model and its programming in R. So here is what I want to do: I take quotes of two indices - S&P500 and DJ. And the aim is to estimate coefficients of the DCC-GARCH model for them. This is how I do it: library(tseries) p1 = get.hist.quote(ins

Re: [R] getting time series into r

2011-05-23 Thread David Winsemius
On May 23, 2011, at 2:32 PM, Heiman, Thomas J. wrote: Hi, I am trying to get the attached following two timeseries Nothing attached. The mail-server refuses files with csv extension but would have accepted them with .txt extension. It's just a dumb machine, after all. -- David. (these

Re: [R] RGL package installation problem on Centos

2011-05-23 Thread Mike Marchywka
Date: Mon, 23 May 2011 14:43:59 +0100 From: arraystrugg...@gmail.com To: r-help@r-project.org Subject: [R] RGL package installation problem on Centos Dear R users, I have installed the latest version of R from source on Centos (using configure a

Re: [R] Get contour of a map

2011-05-23 Thread Duncan Murdoch
On 11-05-23 5:55 AM, Pierre Bruyer wrote: Hello everybody, I search a function which returns the contour of map with levels like contourLines, but I would like this function return the border of the map too, because the function contourLines cannot consider the corner of the map and it is not

[R] help on permutation/randomization test

2011-05-23 Thread Wenjin Mao
Hi, I have two groups of data of different size: group A: x1, x2, , x_n; group B: y1, y2, , y_m; (m is not equal to n) The two groups are independent but observations within each group are not independent, i.e., x1, x2, ..., x_n are not independent; but x's are independent from y's

Re: [R] so current status of interactive PDF creation isl? trying to explore econometriic convergence thread

2011-05-23 Thread Duncan Murdoch
On 11-05-23 8:04 AM, Mike Marchywka wrote: I think I just saw a thread go by on " how do I make interactive PDF from rgl output" but I ignored it at the time and can't seem to find consensus result on google. Essentially I wanted to create pdf or other output to share a 3D plot and let viewers

Re: [R] RGL package installation problem on Centos

2011-05-23 Thread Duncan Murdoch
On 11-05-23 9:43 AM, john herbert wrote: Dear R users, I have installed the latest version of R from source on Centos (using configure and make install). This seemed to work fine, with no Errors reported and R at the command line starts R. However, if I try and installed the package rgl using; i

[R] getting time series into r

2011-05-23 Thread Heiman, Thomas J.
Hi, I am trying to get the attached following two timeseries (these are small subsets of the whole thing) into R so I can merge them using zoo. tmp <- read.table("baltimore.csv", sep = ",") ##This is timeseries 2 z <- zoo(tmp[, 2:20], as.Date(as.character(tmp[, 1]), format = "%y %m %d")) tmp1

Re: [R] Problem with Princurve

2011-05-23 Thread Gavin Simpson
On Mon, 2011-05-23 at 09:58 -0400, Ravi Varadhan wrote: > Why does this not find a better solution? > > > x <- seq(0,2*pi, length=1000) > > x <- cbind(x/(2*pi), sin(x)) > > > fit1 <- principal.curve(x, plot = TRUE, trace = TRUE, maxit = 100, > + start = cbind(sort(x[,1]), rep(1, nrow(x > Star

[R] What are the common Standard Statistical methods used for the analysis of a dataset

2011-05-23 Thread Ramnath R
Hi, Anybody know what are the common Standard statistical methods used for the analysis of a dataset,and anybody know which of these methods give similar results Ram [[alternative HTML version deleted]] __ R-help@r-project.org mailing list htt

Re: [R] How do I assign boolean (o,1) values to a column?

2011-05-23 Thread Bert Gunter
Hi: On Mon, May 23, 2011 at 7:52 AM, CAR wrote: > Hi everybody!! > > I'm trying to assign boolean values to a column in a matrix depending on the > number of times present in another column. I have no clue, Sorry, I don't have time to help. But have you read "The Introduction to R" tutorial wher

Re: [R] getting time series into r

2011-05-23 Thread Gabor Grothendieck
On Mon, May 23, 2011 at 1:30 PM, Heiman, Thomas J. wrote: > Hi, > > I am trying to get the following two timeseries (these are small subsets of > the whole thing) into R so I can merge them using zoo. > The email may have messed up your data. Try attaching it to your post as a .txt file. It ma

[R] 3D plot with it's quadratic approximation superimposed in same plot

2011-05-23 Thread Megh Dal
Dear all, I would like to draw a 3D plot as shown here http://en.wikipedia.org/wiki/File:NaturalLogarithmAll.png, for this function "f = exp[ 1 - x^2 - y^2]" (this function is some arbitrary!). I am aware of different 3D plotting system in R, however it would be great if I can get that kind of

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-23 Thread Bryan Hanson
Thanks Ian, not too late at all. I need to do some testing but your idea seems like it should work. Thanks, Bryan On May 23, 2011, at 12:44 PM, Ian Gow wrote: This might be a little late, but one option for this issue might be to add a line like Sys.setenv("DROPBOX_PATH" = "/Users/Person

[R] getting time series into r

2011-05-23 Thread Heiman, Thomas J.
Hi, I am trying to get the following two timeseries (these are small subsets of the whole thing) into R so I can merge them using zoo. Timeseries 1=[

Re: [R] days between dates

2011-05-23 Thread Geoffrey Smith
Thank you for the email. The data is unbalanced, meaning that some days are missing. So the sequence of days could be something like Tuesday, Wednesday, Friday, Monday. The diff function would produce 1, 2, 3. But I would like it to produce 1, 2, 1 since there is really only 1 day between Frida

[R] Linear regression - several response variables vs few ind variables

2011-05-23 Thread RAFAEL CAMARGO
Hi Everyone, I need to run several simple linear regressions at once, using the following data. Response variables: Bird species (sp 1, sp2, sp3...spn). Independent variable: Natprop - proportion of natural area. covarate: Effort = hours). One single linear regression would be: lmSp1 <- lm(sp1~ na

[R] Linear regression - several response variables vs few ind variables

2011-05-23 Thread Rafael Xavier de Camargo
Hi all, I need to run several simple linear regressions at once, using the following data. Response variables: Bird species (sp 1, sp2, sp3...spn). Independent variable: Natprop - proportion of natural area. covarate: Effort = hours). One single linear regression would be: lmSp1 <- lm(sp1~ natprop

[R] storing data from loops

2011-05-23 Thread Cecilia Pinto
Dear R-help list, I have a problem storing results from a bootstrap loop. What I doing is creating an empty matrix before the loop, then run the loop. Before the end of the loop I have a command line which defines which results inside the loop will have to go in the empty matrix. Here is the code I

Re: [R] Data values on graphics

2011-05-23 Thread Yuta Tamberg
zcatav wrote: > > How can i add data values or proportion values on bar or pie charts? > You can add any text or numbers to any place of a graph with this command: > text(45,20,"some text") where: 45 is position on the X-axis and 20 - on the Y. Note that numbers denote the MIDDLE of the text,not

[R] denoting post-hoc test differences using letters

2011-05-23 Thread Adrienne Keller
Is there code in R to automatically assign letters to different groups that are found to be statistically significant using a post-hoc test following an ANOVA? For example, let's say I found that relative rates of tree growth were statistically significant between tree species using an ANOV

[R] How do I assign boolean (o,1) values to a column?

2011-05-23 Thread CAR
Hi everybody!! I'm trying to assign boolean values to a column in a matrix depending on the number of times present in another column. I have no clue, I have been 2 days looking for a way, if somebody knows what kind of functions I need to use I will really apreciate it. example: Color Type Mar

[R] predict a MA timeseries

2011-05-23 Thread user84
Hi, could anyone tell me how predict() predicts the new value(s), of a MA(1) arima-modell. its really easy to make it with an AR(1), knowing the last term, but how can i or R know the last error? It would also help if somebody could tell me how to find the "open" source of the function predict().

[R] Applying boxplot.stats to multiple value lists

2011-05-23 Thread Rashid Bakirov
Hello all R gurus, I have a following problem which I hope someone will help me to solve. I have a data.frame in form similar to below. > testframe<-data.frame("Name"=c("aa","aa","aa","aa","aa","bb","bb","bb","bb","bb"),"Value"=c(1,100,1,1,1,100,100,100,100,1)) Name Value 1aa 1

[R] RGL package installation problem on Centos

2011-05-23 Thread john herbert
Dear R users, I have installed the latest version of R from source on Centos (using configure and make install). This seemed to work fine, with no Errors reported and R at the command line starts R. However, if I try and installed the package rgl using; install.packages("rgl") I get the following

[R] Data values on graphics

2011-05-23 Thread Zeki Çatav
Hello, How can i add data values or proportion values on bar or pie charts? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/Data-values-on-graphics-tp3543968p3543968.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] [r] regression coefficient for different factors

2011-05-23 Thread Francesco Nutini
In fact "temp.data$" is not necessary, but the command still not run. Thanks for your response, I'm also tring other point of view (suggested by r-helpers). For example ?ddply and ?lmList. If you are interested I will keep you updated. Francesco > Date: Fri, 20 May 2011 13:04:41 -0400 > Subjec

[R] Get contour of a map

2011-05-23 Thread Pierre Bruyer
Hello everybody, I search a function which returns the contour of map with levels like contourLines, but I would like this function return the border of the map too, because the function contourLines cannot consider the corner of the map and it is not adapted to fill polygon after that. Thanks

[R] Interpreting the results of the zero inflated negative binomial regression

2011-05-23 Thread Vishnu B
Hi, I am new to R and has been depending mostly on the online tutotials to learn R. I have to deal with zero inflated negative binomial distribution. I am however unable to understand the following example from this link http://www.ats.ucla.edu/stat/r/dae/zinbreg.htm The result gives two blocks.

[R] Standard error lines within xyplot trellis plots

2011-05-23 Thread e-mail tom.pienkowski
Hi I'm using the lattice function to plot catch data for two types of catch between two communities over time using the xyplot. I've used *"smooth"*when specifying * type=c( )* . Here is a sample of my code below: > xyplot(ns+ rc~wk|location, type=c("p", "smooth"), xlab="Week", + main="Native sh

Re: [R] days between dates

2011-05-23 Thread Jeff Newmiller
Your request seems bizarre to me. If you really want to ignore the actual time intervals, just do your analysis without the actual dates. If you just want forward-looking time intervals, then put them in the correct index locations. ?diff c(diff(DF$DATE),1)

Re: [R] Help with isolating and comparing data from two files.

2011-05-23 Thread ajn21
Jim, Thank you for your help! That is precisely what I was looking for. From your help I was able to edit the output and then print it to a txt file (because I didn't want to print it all in the R console due to the thousands of lines). R is a very powerful language, but it is rather difficult fo

Re: [R] days between dates

2011-05-23 Thread armstrwa
Geoff, I think you could write an if loop to solve this. You could write: for(i in 1:num_obs){ if(DAYS[i]=='Monday'){ DF$DAYS.BETWEEN[i]<-1 } } Where 'num_obs' is the total number of temperature observations you have. This would only be correct if you had no missing data on Fridays. Also, if

Re: [R] Downloading a csv from Dropbox using the shareable link

2011-05-23 Thread Ian Gow
This might be a little late, but one option for this issue might be to add a line like Sys.setenv("DROPBOX_PATH" = "/Users/PersonA/Dropbox/") to Person A's .Rprofile (on my Mac, this is in my home directory) and the equivalent (mutatis mutandis) to Person B's .Rprofile and then use Sys.getenv("D

Re: [R] Problem with Princurve

2011-05-23 Thread Henrik Bengtsson
You may have to tune the curve fitting parameters. Have a look at arguments 'smoother' and '...' in help("principal.curve"), i.e. by default principal.curve() uses "smoother" function smooth.spline() in each iteration and principal.curve() passes down any additional arguments to it that you give (

Re: [R] weird problem - R is not finding the data for the factor level present in the data

2011-05-23 Thread Dimitri Liakhovitski
Sorry - please ignore. I've rerun-it from scatch, and it worked this time! D. On Mon, May 23, 2011 at 11:48 AM, Dimitri Liakhovitski wrote: > Sorry for no code - but it's a more of a general question. > I have read in a data frame ("|"-delimited, .txt). > daily<-read.table(file="filename.txt",sep

[R] weird problem - R is not finding the data for the factor level present in the data

2011-05-23 Thread Dimitri Liakhovitski
Sorry for no code - but it's a more of a general question. I have read in a data frame ("|"-delimited, .txt). daily<-read.table(file="filename.txt",sep="|",header=T) One of the variables is a factor with 110 levels: >str(daily$dma_id) Factor w/ 110 levels "500","501","503",... 108 levels of this

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Bert Gunter
Check the Help archives, google, search cran, as this has been requested many times. IIRC, Greg Snow's gtools package has a function that does this. -- Bert On Mon, May 23, 2011 at 8:39 AM, Tal Galili wrote: > Thanks Bery and Richard. > So how would you suggest to create a histogram function wit

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread jim holtman
try this -- it scales to the maximum value: set.seed(242) z = rnorm(30) hist_z <- hist(z) hist_z$counts / hist_z$density # the relation is 15 # why is this 15 ?? # So I can now do: hist(z) # change in this statement - scale to the max y <- density(z)$y * max(hist_z$counts) / max(density(z)$y) #is

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Tal Galili
Thanks Bery and Richard. So how would you suggest to create a histogram function with an added density plot on top of it? Here is what I've came up so far (ANY suggestion for improvement will be welcomed!): #- # function hist.plus.dens

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Bert Gunter
... Which makes the cumulative (discrete) distribution 1, as it should be. -- Bert On Mon, May 23, 2011 at 7:59 AM, Tal Galili wrote: > Thanks Richard! > > Contact > Details:--- > Contact me: tal.gal...@gmail.com |  972-52-72758

[R] days between dates

2011-05-23 Thread Geoffrey Smith
Hello, I have some unbalanced panel data that is measured on weekdays only (i.e., excluding Saturday and Sunday). I would like to get the number of days between dates such that the number of days between a Friday and a Monday is 1 (and not 3). Here is some code to illustrate my problem: library(

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Tal Galili
Thanks Richard! Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---

[R] RCurl postForm problem

2011-05-23 Thread Scott Chamberlain
Hello, I am using the function postForm to submit queries to a website. When I submit one query I get the query contents back, but when I submit a different query to the same site I get the query results from the previous search. I don't seem to have this problem using GET format searches. I

Re: [R] Remove duplicate elements in lists via recursive indexing

2011-05-23 Thread Janko Thyson
Hi Timothy, and thanks for the answer. Loops where exactly what I was trying to avoid as much as possible. My initial idea was that that once I had recursive indexes at my disposal (which were retrieved over recursive loops), I could simply use it in a similar manner as we do with indexes (t

Re: [R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Richard . Cotton
> In order to do this I can use the relation between count and density, but I > would like to know if there is a way for me to predict it upfront. In the code for hist.default, you'll see the line dens <- counts/(n * diff(breaks)) > Here is an example: > > set.seed(242)

[R] How is the relation between Frequency and Counts in hist/density defined?

2011-05-23 Thread Tal Galili
Hi all, I'm looking to add a "density" smoother on top of a hist when Freq=T. In order to do this I can use the relation between count and density, but I would like to know if there is a way for me to predict it upfront. Here is an example: set.seed(242) z = rnorm(30) hist_z <- hist(z) hist_z$cou

Re: [R] R Style Guide -- Was Post-hoc tests in MASS using glm.nb

2011-05-23 Thread Richard . Cotton
> LIST OF CONVENTIONS/STYLES FOR R: > > [1] R coding standards in the R Internals manual > http://www.cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards > > [2] Bioconductor coding standards > http://wiki.fhcrc.org/bioc/Coding_Standards > > [3] Google R style > [http://google-styleg

[R] linear regression with replication

2011-05-23 Thread Christof Kluß
Hi, we want to calculate a linear regression that results from three test series. (The "Average linear regression" over 3 replication.) Each test serie consists of the values ​​for 3 times (0min, 25min, 50min) and is repeated three times. We need such a regression for each combination of subject

Re: [R] Problem with Princurve

2011-05-23 Thread Ravi Varadhan
Why does this not find a better solution? > x <- seq(0,2*pi, length=1000) > x <- cbind(x/(2*pi), sin(x)) > fit1 <- principal.curve(x, plot = TRUE, trace = TRUE, maxit = 100, + start = cbind(sort(x[,1]), rep(1, nrow(x Starting curve---distance^2: 1499.5 Iteration 1---distance^2: 3.114789 Itera

[R] Debugging foreach loop with doMC

2011-05-23 Thread Jannis
Dear list members, I am running a rather long forach loop while using 16 cores on a cluster simultaneously using the package doMC. After approximately 12000 calculations I get the following error message: Fehler in calcs.iter(i) : task 5166 failed - "Indizierung außerhalb der Grenzen" cal

Re: [R] how could I use function in-visible to user in my code?

2011-05-23 Thread Ben Bolker
Shuguang Sun gmail.com> writes: > How could I use function in-visible to user in my code? For example > 'survfitKM' or 'survfit.formula' in package survival. These functions > are in-visible to user. ?":::" e.g. survival:::survfit.formula __ R-help

[R] how could I use function in-visible to user in my code?

2011-05-23 Thread Shuguang Sun
Dear R user, How could I use function in-visible to user in my code? For example 'survfitKM' or 'survfit.formula' in package survival. These functions are in-visible to user. Thanks, Shuguang __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] Problem with Princurve

2011-05-23 Thread Gavin Simpson
On Thu, 2011-05-19 at 06:43 -0700, guy33 wrote: > Hey all, > > I can't seem to get the princurve package to produce correct results, even > in the simplest cases. For example, if you just generate a 1 period > noiseless sine wave, and ask for the principal curve and plot, the returned > curve is

  1   2   >