Re: [R] loop in optim

2011-07-08 Thread Joshua Wiley
On Thu, Jul 7, 2011 at 9:45 PM, EdBo n.bow...@gmail.com wrote: Hi Josh, 1) I got hold of the library(optimx) but surprising I seem to be failing to use it. On the previous code, that was working, I replaced the optim function with: out[i, ] - optimx(llik, par = start.par, method =

Re: [R] aggregation question

2011-07-08 Thread Jim Lemon
Dr Eberhard Lisse e...@lisse.na wrote: Hi, I am reading payment data like so 2010-01-01,100.00 2010-01-04,100.00 ... 2011-01-01,200.00 2011-01-07,100.00 and plot it aggregated per month like so library(zoo) df - read.csv(daily.csv, colClasses=c(d=Date,s=numeric)) z - zoo(df$s,

Re: [R] kripp.alph error message

2011-07-08 Thread Jim Lemon
On 07/08/2011 04:54 AM, sderose wrote: Hi! I fairly new to R, have only done pretty basic things so far, so this may be a very basic question. But I did search the forums and didn't see a solution I'm trying to get going with kripp.alpha(). I'm loading data from a file, like this:

[R] Using t tests

2011-07-08 Thread Gwanmesia
Dear Sir, I am doing some work on a population of patients. About half of them are admitted into hospital with albumin levels less than 33. The other half have albumin levels greater than 33, so I stratify them into 2 groups, x and y respectively. I suspect that the average length of

[R] Odp: Using t tests

2011-07-08 Thread Petr PIKAL
Hi [R] Using t tests Dear Sir, I am doing some work on a population of patients. About half of them are admitted into hospital with albumin levels less than 33. The other half have albumin levels greater than 33, so I stratify them into 2 groups, x and y respectively. I

Re: [R] apply family functions (tapply, sapply, mapply etc)

2011-07-08 Thread Uwe Ligges
On 07.07.2011 20:30, Dimitris.Kapetanakis wrote: Dear all, I am trying to use apply or similar functions in order to improve the efficiency of my code but I guess I am misunderstanding the function of these commands. What I want to do is possible to see with the following code that I use a

[R] Making a new package: licence

2011-07-08 Thread Federico Calboli
HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is written in R the licence R used for R would affect the code (hence my GPL stands for whatever version of the GPL R is under) I am happy with

[R] R 2.13.1 is released

2011-07-08 Thread Peter Dalgaard
I've rolled up R-2.13.1.tar.gz a short while ago. This is a maintenance release to consolidate various minor fixes to 2.13.0. The Licencing change to GPL-2 | GPL-3 may be of interest to some. You can get it from http://cran.r-project.org/src/base/R-2/R-2.13.1.tar.gz or wait for it to be

Re: [R] problem loading rgdal with Rapache, problem solved due to libexpat with apache.

2011-07-08 Thread Mike Marchywka
Well, I'm not sure it is really an rgdal problem as much as having a stale so and I didn;t want to go wreck the thing to capture the exact error message, the point was that apache build seems to have come with incompatible expat so.  In the apache/lib dir, I apparently had a much different libs,

Re: [R] Making a new package: licence

2011-07-08 Thread Duncan Murdoch
On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is written in R the licence R used for R would affect the code (hence my GPL stands for whatever

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is written in R the licence R used for R would

Re: [R] Create simulated data's using mvrnorm

2011-07-08 Thread Uwe Ligges
Not sure if I understand your problem completely. If so, you could try to run an LDA on the x with y as classlabels factor(rep(1:3, each=10)) and see if it can perfectly separate the classes. Uwe Ligges On 06.07.2011 17:31, Aparna Sampath wrote: Hi All This might be something very

[R] reference on graph theory

2011-07-08 Thread Guilherme Wood
Dear r users, does anyone have a suggestion of a book on graph theory, which may help designing the analysis of neuroimaging resting-states data? Thanks, Guilherme [[alternative HTML version deleted]]

[R] problem to set CRAN mirror

2011-07-08 Thread Md Mahmudul Haque
Dear Sir, When i am trying to set CRAN mirror to install packages, its showing the following messages, i can't install the packages chooseCRANmirror() Warning message: In open.connection(con, r) : unable to connect to 'cran.r-project.org' on port 80. Best regards Mahmud

Re: [R] Taking inputs from the user

2011-07-08 Thread Verma, Ankur
Hi Jim, Thanks for your response. I was actually thinking in terms of an executable file which could return the output back to an excel sheet. I was thinking of having a small script/executable which would read an excel file get the values... Run the modelget the prediction and return

[R] vectors cross-product V1 x V2

2011-07-08 Thread Bai
Hi, everyone, I need an efficient way to do vectors cross product in R. Set vectors, V1 = ai + bj + ck V2 = di + ej + fk then the cross product is V1 x V2= (bf - ce) i + (cd - af) j + (ae - bd) k As shown here ( http://en.wikipedia.org/wiki/Cross_product ). Thanks. Best, Bai

[R] Simple R graph question

2011-07-08 Thread ashz
Dear All, I have several objects (imported from excel via using “xlsx”) with the field names: Month/Year, X, Y1, Y2, Y3. What is the best library/way to generate a graph which will be consist of multiple plots (Month/Year) that each contain the X, Y1, Y2, Y3 dataset. Thanks a lot. Cheers,

Re: [R] R-help Digest, Vol 101, Issue 8

2011-07-08 Thread mihalicza . peter
Július 7-től 14-ig irodán kívül vagyok, és az emailjeimet nem érem el. Sürgős esetben kérem forduljon Kárpáti Edithez (karpati.e...@gyemszi.hu). Üdvözlettel, Mihalicza Péter I will be out of the office from 7 July till 14 July with no access to my emails. In urgent cases please contact Ms.

[R] Fwd: logistic regression with combination to distributed lag

2011-07-08 Thread meghana kulkarni
Hello all, I am facing difficulty in deciding how to go about analysis of a situation explained as follows: I have two variables Y (response) and X (explanatory) (There are several other potential candidate explanatory variables, but right now I am looking at only one variable.) Y is binary

[R] R-help: need help in obtaining training data and predictions for neural networks

2011-07-08 Thread Hafsa Hassan
Dear list, I am new to R and am using it to develop and test my own neural network codes. I need some training datasets that have the prediction results that should (approximately) appear when the datasets are passed through a good neural network, in order to test whether my code is working

[R] How to Get option prices of first date and expiry date alone

2011-07-08 Thread Subramanian S
i have option prices of 1 month option contract for several days in a csv file. The data is in chronological order of dates. Within each date, price quotes for each strike appears (about 30 strikes per month- so there are in 30 rows per day for many days and many months). i want only the quote on

[R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Paolo Rossi
Hello, I wonder if someone can elaborate on why in the first graph I am able to set labels vertical to the x-axis but not in the second. I tried to select the window but it didnt really help. Many Thanks Paolo ExtAvgCWV = rnorm(200) ExtAvgDemand = rnorm(200) ExtGasDays = seq(from =

Re: [R] Simple R graph question

2011-07-08 Thread jim holtman
A little more specificity required; sample of the data, do you want multiple plots each with a single variable, or do you want them all on one plot as lines/areas/points/etc. Do you want then broken down by year, month, or some other way. It is easy to generate plots once you know what you want.

[R] survConcordance with 'counting' type Surv()

2011-07-08 Thread Eleni Rapsomaniki
Dear Prof. Therneau I was impressed to discover that the 'survConcordance' now handles Surv() objects in counting format (example below to clarify what I mean). This is not documented in the help page for the function. I am very curious to see how a c-index is estimated in this case, using

Re: [R] How do I overlay two trellis plots of lme fitted lines produced by plot.augPred?

2011-07-08 Thread rwnahhas
Thank you! Exactly what I wanted. Ramzi -- View this message in context: http://r.789695.n4.nabble.com/How-do-I-overlay-two-trellis-plots-of-lme-fitted-lines-produced-by-plot-augPred-tp3652204p3653988.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] problem to set CRAN mirror

2011-07-08 Thread Prof Brian Ripley
It is a warning: it will fall back to the version used in your unstated version of R. Nothing you show justifies your claim i can't install the packages However, most likely you have a problem connecting to the internet at all: see the FAQ relevant to your unstated OS or ask your local IT

Re: [R] vectors cross-product V1 x V2

2011-07-08 Thread Eik Vettorazzi
Hi, how about this: mm-cbind(V1,V2) xy-sapply(1:3,function(x)det(mm[-x,])*(2*(x%%2)-1)) #some checks all.equal(0,as.vector(xy%*%V1)) all.equal(0,as.vector(xy%*%V2)) Am 08.07.2011 08:27, schrieb Bai: Hi, everyone, I need an efficient way to do vectors cross product in R. Set vectors, V1

Re: [R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Alexander Engelhardt
Hey, from what I see, you try to use the par(las=3) function after the plot command. You should use it before it, though. Somewhat liek this: ExtAvgCWV = rnorm(200) ExtAvgDemand = rnorm(200) ExtGasDays = seq(from = as.Date(2010-8-4, %Y-%m-%d), along.with = ExtAvgCWV, by = days) op - par(las

Re: [R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Paolo Rossi
Hi Berry, True, it works. Thanks for this and teh general advice. I have been doing things wrong from day 1 and never realised it! Cheers, Paolo On 8 July 2011 13:43, Berry Boessenkool berryboessenk...@hotmail.comwrote: Hey Paolo, you should specify las BEFORE you send the axis command.

[R] coxme for random effects only model

2011-07-08 Thread Chang, Yu-Mei
Dear all, I have encountered the following problem where coxme seems to allow model with only random effect in R 2.11.1 but not in R 2.13.0. Following is the error message using rat example data. Any comment on this is appreciated. In R2.13 library(coxme) rat1 - coxme(Surv(time,

Re: [R] Return invisible list

2011-07-08 Thread S Ellison
-Original Message- [mailto:r-help-boun...@r-project.org] On Behalf Of francisco.ahued Subject: [R] Return invisible list x=read.table(data.txt,header=T) goa=(x[,3]) meplot(goa) I can see the plot, but I would like to see the values of the x and y axis. Something returned

Re: [R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Berry Boessenkool
Hey Paolo, you should specify las BEFORE you send the axis command. It would also be good to set greater margins, this needs to be set before the entire plot, thus in following order: par(las = 3, mar=c(6,2,2,2)) plot(ExtAvgCWV, ann=FALSE, xaxt=n, yaxt=n ) axis(side =1 , at = tickplaces,

[R] Model fit using mcexact from exactLoglinTest

2011-07-08 Thread Michael . Laviolette
I'm using the mcexact function from the exactLoglinTest package on data comparing performance of rapid and laboratory tests for detection of H1N1 flu. My setup is as follows: ridt.res - c(A-B-, A+B-, A-B+) pcr.res - c(Negative, AH3, B) xtab - expand.grid(ridt = ridt.res, pcr = pcr.res)

[R] ASCII values to Decimal

2011-07-08 Thread Bansal, Vikas
Dear all, I have a file and I am using a code- df=read.table(Case2.pileup,fill=T,sep=\t,colClasses = character) to create a data frame that is df. now in 4th column I have ASCII values which I want to convert in decimal values.the data frame is like this- V1 V2 V3

Re: [R] vectors cross-product V1 x V2

2011-07-08 Thread Jeff Newmiller
RSiteSearch(cross product) library(pracma) ?cross Speed is usually desired in the context of many similar computations, and is normally achieved in R by vectorizing computation, so storing the large number of 3d vectors together in a structure like a Nx3 matrix so the code can be vectorized

Re: [R] Making a new package: licence

2011-07-08 Thread Spencer Graves
On 7/8/2011 4:26 AM, Federico Calboli wrote: On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no version. My assumption is, since all the code is

Re: [R] gdata read.xls() values format problem

2011-07-08 Thread Victor11
Thank you for your suggestion Gabor. I hope they can fix this in later versions. Victor -- View this message in context: http://r.789695.n4.nabble.com/gdata-read-xls-values-format-problem-tp3652494p3654334.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
On 8 Jul 2011, at 15:56, Spencer Graves wrote: Ok, thanks for that. I though that, since R in under GPL-v2, I can only release my code under GPL-v2 because the code is written in R and probably qualifies as a derivative work. Did you include someone else's GPL-vx code (possibly

Re: [R] Making a new package: licence

2011-07-08 Thread Jeff Newmiller
On 07/08/2011 07:58 AM, Spencer Graves wrote: On 7/8/2011 4:26 AM, Federico Calboli wrote: On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no

Re: [R] Making a new package: licence

2011-07-08 Thread Barry Rowlingson
On Fri, Jul 8, 2011 at 4:07 PM, Federico Calboli f.calb...@imperial.ac.uk wrote: On 8 Jul 2011, at 15:56, Spencer Graves wrote: Ok, thanks for that. I though that, since R in under GPL-v2, I can only release my code under GPL-v2 because the code is written in R and probably qualifies as a

Re: [R] Making a new package: licence

2011-07-08 Thread Federico Calboli
On 8 Jul 2011, at 16:12, Barry Rowlingson wrote: On Fri, Jul 8, 2011 at 4:07 PM, Federico Calboli f.calb...@imperial.ac.uk wrote: On 8 Jul 2011, at 15:56, Spencer Graves wrote: Ok, thanks for that. I though that, since R in under GPL-v2, I can only release my code under GPL-v2 because the

Re: [R] Making a new package: licence

2011-07-08 Thread Marc Schwartz
On Jul 8, 2011, at 9:58 AM, Spencer Graves wrote: On 7/8/2011 4:26 AM, Federico Calboli wrote: On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL'

Re: [R] Making a new package: licence

2011-07-08 Thread Spencer Graves
On 7/8/2011 8:07 AM, Federico Calboli wrote: On 8 Jul 2011, at 15:56, Spencer Graves wrote: Ok, thanks for that. I though that, since R in under GPL-v2, I can only release my code under GPL-v2 because the code is written in R and probably qualifies as a derivative work. Did you include someone

Re: [R] Making a new package: licence

2011-07-08 Thread Duncan Murdoch
On 08/07/2011 10:56 AM, Spencer Graves wrote: On 7/8/2011 4:26 AM, Federico Calboli wrote: On 8 Jul 2011, at 12:06, Duncan Murdoch wrote: On 11-07-08 6:20 AM, Federico Calboli wrote: HI All, I have written and succesfully uploaded a new package. The licence it is under is 'GPL' --no

Re: [R] Making a new package: licence

2011-07-08 Thread Barry Rowlingson
On Fri, Jul 8, 2011 at 4:16 PM, Federico Calboli f.calb...@imperial.ac.uk wrote: The vast majority of CRAN libraries seem to be released under some sort of GPL version. I never seen a license though. You're right. The GNU people say should: http://www.gnu.org/licenses/gpl-howto.html ---

Re: [R] Making a new package: licence

2011-07-08 Thread Gabor Grothendieck
On Fri, Jul 8, 2011 at 11:16 AM, Federico Calboli f.calb...@imperial.ac.uk wrote: On 8 Jul 2011, at 16:12, Barry Rowlingson wrote: On Fri, Jul 8, 2011 at 4:07 PM, Federico Calboli f.calb...@imperial.ac.uk wrote: On 8 Jul 2011, at 15:56, Spencer Graves wrote: Ok, thanks for that. I though

[R] Using Windows 7 Task Scheduler with R source scripts

2011-07-08 Thread daniel.egan
Hello all, I'm trying to get a specific source file to run at a certain time each day with WindowsScheduler http://windows.microsoft.com/en-US/windows7/schedule-a-task I've tried a number of methods, none of which work: My best guess was: 1. Associate the script.R file with R in FileTypes. 2.

[R] Simple conditional plot

2011-07-08 Thread rstudent
I just started using R last week. I have a dataset with 3 columns - Plate, Well and Raw I need to make a simple plot(Well~Raw) but only when Plate = 101 Thanks for your help. -- View this message in context: http://r.789695.n4.nabble.com/Simple-conditional-plot-tp3654300p3654300.html Sent

[R] Getting wrong NA values using for cmd

2011-07-08 Thread VictorDelgado
Hi There, I'm facing one problem to construct a vector using the for command: I have one matrix named 'dados' (same as /data/ from portuguese), for example: dados[140:150,] [,1] [,2] [,3] [1,] 212.7298 0.14 0.11 [2,] 213.3778 0.14 0.11 [3,] 214.0257 0.15 0.11 [4,] 214.6737 0.15

Re: [R] ASCII values to Decimal

2011-07-08 Thread Matthew Maycock
You can do: as.numeric(charToRaw(paste(df[,4], collapse=))) If you somehow want each row to be its own sequence of integers, you could do something like: lapply(df[,4], function(c) as.numeric(charToRaw(c))); ~Matthew Maycock -Original Message- From: r-help-boun...@r-project.org

Re: [R] Naive Bayes Classifier

2011-07-08 Thread Petr Savicky
On Thu, Jul 07, 2011 at 02:18:17PM -0700, m.marcinmichal wrote: Hi, Currently I testing the packets that contain built-in features for classification. Actually I looked packages such as: e1071, Klar, Caret, CORElearn. However, from what I noticed when building a naive Bayesian classifier,

Re: [R] gdata read.xls() values format problem

2011-07-08 Thread Gabor Grothendieck
On Thu, Jul 7, 2011 at 6:07 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Thu, Jul 7, 2011 at 4:23 PM, Victor11 yao.z...@invesco.com wrote: Dear All, When I use read.xls() in gdata package to read xls files, I noticed an issue and couldn't find any solutions after I serched all

Re: [R] Getting wrong NA values using for cmd

2011-07-08 Thread Sarah Goslee
Looks like FAQ 7.31 to me. Try all.equal() instead of ==. Sarah On Fri, Jul 8, 2011 at 11:06 AM, VictorDelgado victor.m...@fjp.mg.gov.br wrote: Hi There, I'm facing one problem to construct a vector using the for command: I have one matrix named 'dados' (same as /data/ from portuguese),

Re: [R] Simple conditional plot

2011-07-08 Thread Greg Snow
Try plot(Well~Raw, subset= Plate==101) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of rstudent Sent: Friday, July 08, 2011 8:56 AM To: r-help@r-project.org Subject: [R] Simple conditional plot I just started using R last week.

Re: [R] Taking inputs from the user

2011-07-08 Thread Greg Snow
Are your users willing to install an Excel plug-in? If so, look at the RExcel project, it does what you describe and the common user thinks they are just using Excel with a plug-in without realizing that they have installed and are using a useful tool in the background. -Original

Re: [R] Simple conditional plot

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 10:55 AM, rstudent wrote: I just started using R last week. I have a dataset with 3 columns - Plate, Well and Raw I need to make a simple plot(Well~Raw) but only when Plate = 101 ?subset # Some plotting paradigms allow you to use a subset = argument but any program

Re: [R] How do I overlay two trellis plots of lme fitted lines produced by plot.augPred?

2011-07-08 Thread rwnahhas
In case anyone else is interested... I just found another solution, which has some pros and cons compared to Dennis' solution... plot(comparePred(fit.lme, update(fit.lme, y ~ log(age # Pros - Automatically adds a legend # Cons - Only works for comparing two models # Dennis' solution extends

Re: [R] Using t tests

2011-07-08 Thread Greg Snow
How are you measuring length of stay? A chi-square test suggests that you have it categorized, a t-test assumes it is continuous (and relatively symmetric with the amount depending on sample size). Do you have any censoring? (patients dying or transferring before discharge) if so you should

Re: [R] Using t tests

2011-07-08 Thread Marc Schwartz
Just to add onto Greg's comments, you may want to review this thread over on MedStats, since this topic was just discussed extensively this week, initially as a query about using LOS as a covariate: http://groups.google.com/group/medstats/browse_thread/thread/f875fdeeaf48dc38?hl=en It is

Re: [R] Using Windows 7 Task Scheduler with R source scripts

2011-07-08 Thread Pfaff, Bernhard Dr.
Hello Dan, I reckon that you need to path a batch-file to the scheduler, i.e. something along the lines R CMD BATCH script.R shall be included in, say, 'RBatchjob.bat' and this file shall then be called by the task scheduler. Best, Bernhard -Ursprüngliche Nachricht- Von:

Re: [R] Using Windows 7 Task Scheduler with R source scripts

2011-07-08 Thread Tracy Waldon
In Windows Vista, here is what I do: Create a .bat file that calls R to run the script. Then set the task scheduler to run the batch file. It's a round about way but it works for me. # begin example of *.bat file contents cd C:\R\R-2.13.0\bin R CMD BATCH C:\MyBats\MyBat.R

[R] How to generate heteroscedastic random numbers?

2011-07-08 Thread UnitRoot
Hello, I have tried to generate numbers randomly which follow normal, Student-t and skewed Student-t distributions. However, when I check those series for heteroscedastisity test (ARCH) results are showing that there is no heteroscedastisity. As we all know, returns (financial returns) usually

Re: [R] Condional Density Plot from different data

2011-07-08 Thread rstudent
Tried this and received this error: Error in hist.default(x = integer(0), plot = FALSE) : invalid number of 'breaks' -- View this message in context: http://r.789695.n4.nabble.com/Condional-Density-Plot-from-different-data-tp3080615p3654634.html Sent from the R help mailing list archive at

Re: [R] Getting wrong NA values using for cmd

2011-07-08 Thread VictorDelgado
ty S. Goslee, It's helpfull to test the condition: all.equal(s[4],0.15) [1] TRUE instead the previous FALSE answer obtained with s[4]==0.15 [1] FALSE but I still need get it to vector r: Victor Delgado wrote: for (w in 1:length(s)){ r[w] - dados[,3][dados[,2]==s[w]][1] } I just

Re: [R] How to generate heteroscedastic random numbers?

2011-07-08 Thread Duncan Murdoch
On 08/07/2011 12:15 PM, UnitRoot wrote: Hello, I have tried to generate numbers randomly which follow normal, Student-t and skewed Student-t distributions. However, when I check those series for heteroscedastisity test (ARCH) results are showing that there is no heteroscedastisity. As we all

[R] How to label specific points on a scatterplot

2011-07-08 Thread rstudent
Command I am using for the plot: plot(Raw[][Plate==101]~well[][Plate==101], xlab=Well, ylab=Raw, main=Plate 101) I only want to label points on the graph where well equals B13, G13, K14 and N14 with the name of the well. Thank you for your help. -- View this message in context:

Re: [R] Simple conditional plot

2011-07-08 Thread VictorDelgado
Another possibility without using subset(): plot(Well[][Plate==101]~Raw[][Plate==101]) This also works to '=' '=' and other conditions. -- View this message in context: http://r.789695.n4.nabble.com/Simple-conditional-plot-tp3654300p3654666.html Sent from the R help mailing list archive at

[R] Visualizing a dissimilarity matrix in Euclidean space

2011-07-08 Thread Tea Los
Hi, I have a set of nodes and a dissimilarity matrix for them, as well as a csv file in which the diss matrix has been converted to [node_1, node_2, dissimilarity] format. I would like to visualize this as a graph in Euclidean space (that is, similar nodes clumped together in clusters), rather

[R] Extremum index from a sampling time series data

2011-07-08 Thread FMH
Dear All,   I am working on a time series of hourly river flow measurements from 2000 - 2003  and have been trying to compute the extremum index from the original series as well as a new series from  sampling with replacement . The extremum Index produced from the original data series looks  

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 1:31 PM, rstudent wrote: Command I am using for the plot: plot(Raw[][Plate==101]~well[][Plate==101], xlab=Well, ylab=Raw, main=Plate 101) I only want to label points on the graph where well equals B13, G13, K14 and N14 with the name of the well. ?%in% ?text Thank

Re: [R] Extremum index from a sampling time series data

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 1:44 PM, FMH wrote: Dear All, I am working on a time series of hourly river flow measurements from 2000 - 2003 and have been trying to compute the extremum index from the original series as well as a new series from sampling with replacement . The extremum Index

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread rstudent
I can use the text() command to label all points but how do you specify only to label those four specific points on the graph? -- View this message in context: http://r.789695.n4.nabble.com/How-to-label-specific-points-on-a-scatterplot-tp3654697p3654777.html Sent from the R help mailing list

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 2:02 PM, rstudent wrote: I can use the text() command to label all points but how do you specify only to label those four specific points on the graph? No context, no example, evidence that you read the rest of my message, no further response. -- View this message

Re: [R] Polynomial fitting

2011-07-08 Thread Matti Jokipii
Thank you Gerrit for the quick reply! And yes, i'm Matti. I can get the coeffs now, though i'm not sure whether i'm doing something wrong or whether poly is just not the right method for what i'm trying to find. I will look into this more closely and give it another try. Is poly best for

[R] Working in subdirectories

2011-07-08 Thread ssathnur
I want to call in files from subdirectories without changing my working directory within my script. Is that possible? And if so what would be the simplest way to do that? for example, if I do setwd(C:/Users/Hello) but I have files in C:/Users/Hello/Data1 and C:/Users/Hello/Data2, can I still

Re: [R] Working in subdirectories

2011-07-08 Thread Duncan Murdoch
On 08/07/2011 2:47 PM, ssathnur wrote: I want to call in files from subdirectories without changing my working directory within my script. Is that possible? And if so what would be the simplest way to do that? for example, if I do setwd(C:/Users/Hello) but I have files in C:/Users/Hello/Data1

[R] Tom Short's R cheat sheet

2011-07-08 Thread Gene Leynes
I noticed that there is a newer version of Tom Short's cheat sheet than the version currently posted on CRAN. Personally I like the newer version, but maybe keeping the old version is deliberate. Anyway, I was wondering if there's someone that I can notify that can update the content. New

Re: [R] How to generate heterosced​astic random numbers?

2011-07-08 Thread Arun Kumar Saha
Answering http://r.789695.n4.nabble.com/How-to-generate-heteroscedastic-random-numbers-td3654534.html I think best way to generated Heterosced​astic data would be, first fix or assume some DGP of your choice, you may assume any arbitrary model parameter(s) provided forms of those parameters are

[R] Selecting subset of a given vector

2011-07-08 Thread Nipesh Bajaj
Hi there, given a numeric vector, I can select numbers within a specific range. However presently, I have something related but different problem. Suppose I have a numeric vector. Now take an arbitrary number. Goal to to chose a specific subset with a given length, from that given vector, so that

Re: [R] Selecting subset of a given vector

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 3:16 PM, Nipesh Bajaj wrote: Hi there, given a numeric vector, I can select numbers within a specific range. However presently, I have something related but different problem. Suppose I have a numeric vector. Now take an arbitrary number. Goal to to chose a specific subset

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread rstudent
I have only been using R for a very short time and I'm trying to learn. What information do you need to help me? -- View this message in context: http://r.789695.n4.nabble.com/How-to-label-specific-points-on-a-scatterplot-tp3654697p3654903.html Sent from the R help mailing list archive at

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread VictorDelgado
rstudent, one solution could be given by spliting your graph in two parts: part_1 - # take the desired four points subset # part_2 - # all rest points not to label You will also need one vector with your names. I supose: list - c(B13, G13, K14, N14) So plot(part_1$x, part_1$y) text(part_1$x,

Re: [R] How to label specific points on a scatterplot

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 2:53 PM, rstudent wrote: I have only been using R for a very short time and I'm trying to learn. What information do you need to help me? As it says at the bottom of every message to Rhelp: read the posting guide http://www.R-project.org/posting-guide.html -- View

Re: [R] Selecting subset of a given vector

2011-07-08 Thread Dennis Murphy
Hi: Do you want the N points in the vector closest to a fixed point? If so, then try this: f - function(vec, center, nselect) { d - (vec - center)^2 vec[order(d)][1:nselect] } v - rnorm(1000) f(v, 0, 10)# select the ten points in v closest to zero Your goal is subject to multiple

[R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
Dear sir, I am struggling with a problem.Please help me. Now I have a dataframe with these columns- V7 V8 V9 V10 0 1 G82 0 1 CGT

[R] Referencing a vector of data labels in ggplot function

2011-07-08 Thread Ben Hunter
Hi, I really feel I've looked everywhere, although I know this can't be a hard problem. I'd like to be able to call the graph below as a function, but I can't get the function to recognize variables beyond 'dframe'. I've read through many papers on writing functions in R, but I can't get this to

Re: [R] Simple R graph question

2011-07-08 Thread ashz
Dear jholtman, Thanks for the reply sorry for the been unclear before. My desire graph is to have multiply plots showing Y1,Y2,Y3 with the same X, were each plot is month-year (e.g., 5-2001, 6-2001, etc). It ill be great if each Y can have a different line and point style. The Lattice

[R] RES: For column values-Quality control

2011-07-08 Thread Filipe Leme Botelho
---BeginMessage--- Hi Vikas. Apply the logic in the example below in your dataframe dta V1 V1 1 85 32 2 80 33 3 77 11 4 75 56 5 96 43 6 99 12 7 94 32 8 97 44 dta[,1]€ [1] TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE which(dta[,1]€) [1] 1 2 5 6 7 8 ref - which(dta[,1]€) dta[ref,]

[R] computing functions with Euler's number (e^n)

2011-07-08 Thread William Armstrong
I am trying to create a set of wavelets in frequency space--namely Cauchy wavelets for an intensity analysis (von Tscharner, 2000). The wavelets are defined by the following formula: [(f/cf)^(cf*scale)]*[e^((-f/cf)+1)^(cf*scale)] where *f *is frequency of length *n*, *cf* is center frequency

Re: [R] Simple R graph question

2011-07-08 Thread Duncan Mackay
At 07:12 09/07/2011, you wrote: Dear jholtman, Thanks for the reply sorry for the been unclear before. My desire graph is to have multiply plots showing Y1,Y2,Y3 with the same X, were each plot is month-year (e.g., 5-2001, 6-2001, etc). It ill be great if each Y can have a different line and

Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
Dear all, I am really sorry for not giving the input file because in my mail,I did not explain my problem in a best way. I have a file that is summary.txt(I have attached it) .we can read this file using- dfa=read.table(summar.txt,fill=T,colClasses = character,header=T) In V10 column I have

[R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
Dear all, I am really sorry for not giving the input file because in my mail,I did not explain my problem in a best way. I have a file that is summary.txt(I have attached it) .we can read this file using- dfa=read.table(summar.txt,fill=T,colClasses = character,header=T) In V10 column I

[R] homogenized cells problem with IF

2011-07-08 Thread jorge alonso Carné/adiskide
Hello, Sorry if it's a simple question, this is my first script complex, but can not find solution in the list I have many TXT files with daily data of meteorological stations and a table that connects it with each of these stations. (More than one table per station and date). With the Script

Re: [R] Packages for quasi-symmetry and quasi-independence

2011-07-08 Thread Michael Friendly
On 7/7/2011 9:14 PM, michael.laviole...@dhhs.state.nh.us wrote: Are there any packages with functions that can fit quasi-symmetry and quasi-indepedence models to square contingency tables? M. Laviolette Yes. See the gnm package for convenience functions that work with glm() and gnm(). See

Re: [R] For column values-Quality control

2011-07-08 Thread David Winsemius
I get something entirely different when I execute that input command with the attached file: This is what I see as the first 14 lines for a displayed value for dfa: dfa V7 V8 V9 V10 10 1 G` 20 1 Ta 30 1 Ca 40 1 Aa 50 1 G_ 60 1

[R] binary conversion list to data.frame with plyr... AND NO LOOPS!

2011-07-08 Thread Justin Haynes
Happy weekend helpeRs! As usual, I'm stumped by R... My plan was to take an integer number, convert it to binary and wind up with a data.frame where each column is either 1 or 0 so I can see which bits are changing: bb-function(i) ifelse(i, paste(bb(i %/% 2), i %% 2, sep=), )

[R] manipulating by lists and ave() functions

2011-07-08 Thread ivo welch
dear R wizards---more ignorance on my part, exacerbated by too few examples in the function documentations. d - data.frame( id=rep(1:3,3), x=rnorm(9), y=rnorm(9)) Question 1: how do I work with the output of by? for example, b - by( d, d$id, function(x) coef(lm( y ~ x, data=x ) )) b d$id:

Re: [R] For column values-Quality control

2011-07-08 Thread Bansal, Vikas
Yes sir.you are right.after this I use this code to convert ASCII values in column V10 to decimal numbers- dfa$V10=lapply(dfa[,4], function(c) as.numeric(charToRaw(c))) now u will get output something like this- V7 V8 V9 V10

[R] lattice: How to vertically adjust an axis label?

2011-07-08 Thread Marius Hofert
Dear expeRts, How can I vertically adjust an axis tick label so that it is nicely aligned with the other labels? library(lattice) xyplot(0~0, xlim=c(0,3), scales=list(x=list(at=c(1,1.1), labels=c(expression(hat(theta)[italic(n)]),expression(theta) ## aim: move the leftmost expression up so

Re: [R] For column values-Quality control

2011-07-08 Thread David Winsemius
On Jul 8, 2011, at 6:46 PM, Bansal, Vikas wrote: Yes sir.you are right.after this I use this code to convert ASCII values in column V10 to decimal numbers- dfa$V10=lapply(dfa[,4], function(c) as.numeric(charToRaw(c))) now u will get output something like this- V7 V8 V9

  1   2   >