Re: [R] extract data features from subsets

2011-06-07 Thread Dennis Murphy
Hi: Here's one way using package plyr and its ddply() function. ddply() takes a data frame as input and expects to output either a scalar or a data frame. In this case, we want the latter. library(plyr) f - function(df) { mn - min(df$result) tms - df$time[df$result == mn] subdf -

[R] variable selection in linear regression

2011-06-07 Thread Syaiba Balqish
Hello With due respect, have a nice time. I would like to ask some command in R. It is regarding variable selection in linear regression. In R, there is one rebuild function called step which selecting variables according to AIC. let say i have data [y, x1,x2,x3,x4] we start with y~b0 i

[R] R results explanation

2011-06-07 Thread mpavlic
Hi all, this might be a stupid question, but still. Everytime i find some new function it's prettty easy to understand how to use the syntax and to perform a text. Even the general idea of what the function does is pretty easy to understand, but i can not find an explanation (detailed

Re: [R] R and DBSCAN

2011-06-07 Thread Paco Pastor
Hello Christian Thanks for answering. Yes, I have tried dbscan from fpc but I'm still stuck on the memory problem. Regarding your answer, I'm not sure which memory parameter should I look at. Following is the code I tried with dbscan parameters, maybe you can see if there is any mistake.

[R] variable selection in linear regression

2011-06-07 Thread Syaiba Balqish
Hello With due respect, have a nice time. I would like to ask some command in R. It is regarding variable selection in linear regression. In R, there is one rebuild function called step which selecting variables according to AIC. let say i have data [y, x1,x2,x3,x4] we start with y~b0

[R] Logistic Regression

2011-06-07 Thread farahnazlakhani
I am working on my thesis in which i have couple of independent variables that are categorical in nature and the depndent variable is dichotomus. Initially I run univariate analysis and added the variables with significant p-values (p0.25) in my full model. I have three confusions. Firstly, I am

Re: [R] R results explanation

2011-06-07 Thread Duncan Murdoch
On 07/06/2011 4:14 AM, mpavlic wrote: Hi all, this might be a stupid question, but still. Everytime i find some new function it's prettty easy to understand how to use the syntax and to perform a text. Even the general idea of what the function does is pretty easy to understand, but i can not

[R] access data on server

2011-06-07 Thread Brown, Mathew
Hello, I'm running R on Linux (Ubantu) and I'm trying to run a script that will read and plot data on a linux server. I've looked around and haven't been able to figure out how to do this. I want to load several files on the server and then be able to manipulate them. Any ideas? Thanks!

Re: [R] Question about curve function

2011-06-07 Thread peter dalgaard
On Jun 6, 2011, at 11:22 , Prof Brian Ripley wrote: As a further example of the trickiness, the function method of plot() relies on curve(x, ...) being a request to plot the function x(x) against x. I've added a comment to that effect to the help page. Ouch. This springs to mind:

[R] Probit Transformation

2011-06-07 Thread Stuart
Hi I have data set consisting of my many variables and also in some cases missing values. I want to probit transformation of my whole data set using library VGAM or any other possible way. I would appreciat if some one can help in writing code for probit transformation V1 V10 V11

[R] About DCC-garch model...

2011-06-07 Thread windseav
Hi, everyone, I currently run into a problem about DCC-Garch model. I use the package cc-garch and the function dcc.estimation. One of the output of this function is DCC matrix, which shows conditional correlation matrix at every time period you gives. However, I cannot figue out how the

Re: [R] Logistic Regression

2011-06-07 Thread Mike Marchywka
Date: Tue, 7 Jun 2011 01:38:32 -0700 From: farah.farid@student.aku.edu To: r-help@r-project.org Subject: [R] Logistic Regression I am working on my thesis in which i have couple of independent variables that are categorical in nature and the

Re: [R] access data on server

2011-06-07 Thread Juergen Rose
Am Dienstag, den 07.06.2011, 11:40 +0200 schrieb Brown, Mathew: Hello, I'm running R on Linux (Ubantu) and I'm trying to run a script that will read and plot data on a linux server. I've looked around and haven't been able to figure out how to do this. I want to load several files on the

Re: [R] RCurl and kerberos

2011-06-07 Thread TAPO (Thomas Agersten Poulsen)
Hi again, RCurl is just smarter than me: getURL(http://my.web.service,.opts=curlOptions(username=:)) does the trick. Don't know how I missed that yesterday. Hope nobody wated time on this. Cheers, Thomas -Original Message- From: TAPO (Thomas Agersten Poulsen) Sent: 6. juni 2011

[R] Populating values from html

2011-06-07 Thread amrita
can we populate values into an excel sheet from html forms that has to be used in R for data analysis Can we directly retireve the values from html forms into R fro analysis -- View this message in context: http://r.789695.n4.nabble.com/Populating-values-from-html-tp3579215p3579215.html Sent

Re: [R] list demographics

2011-06-07 Thread Jim Lemon
On 06/07/2011 06:20 AM, Sarah Goslee wrote: Hi all, I got curious about something, so in proper scientific fashion I obtained some data and analyzed it. Question: what is the female participation in the R-help email list? Data: the most recent list postings, obtained from the website. I took

Re: [R] Logistic Regression

2011-06-07 Thread Frank Harrell
The 10% change idea was never a good one and has not been backed up by simulations. It is quite arbitrary and results in optimistic standard errors of remaining variables. In fact a paper presented at the Joint Statistical Meetings about 3 years ago (I'm sorry I've forgotten the names of the

[R] write gene_id in a bed file

2011-06-07 Thread ads pit
Hi all, I have build the following data frame head(href) chr tx_start tx_end g_id strand cds_start cds_end exon_count 1 chr1 8384389 8404227 NM_001080397 + 8384389 8404073 8 2 chr1 16767166 16786584 NM_001145277 + 16767256 16785491 7 3 chr1 16767166

Re: [R] Segfaults of eigen

2011-06-07 Thread Juergen Rose
Dear Prof. Ripley, Am Montag, den 21.02.2011, 11:40 + schrieb Prof Brian Ripley: So there is very likely a bug in your system software or compiler. There is no such problem on other x86_64 systems (including Fedora 14 and 12, FreeBSD, Solaris and Windows). You can debug segfaults for

[R] rgl: insert pauses in animation sequence / movie formats other than gif?

2011-06-07 Thread Michael Friendly
Two questions related to creating animated movies with rgl: 1. I've created an rgl scene with 5 different views I want to display in a movie, but I'd like to insert pauses (say, 5 seconds) at each view. How can I do this? I first created 5 userMatrix's, then play3d( par3dinterp(

[R] ID50 i) comparisons ii) dose.p vs Reed-Muench

2011-06-07 Thread geast
I'm analysing some ID50 data for 2 different groups and had already calculated this by hand using Reed-Muench formula, when I came across the dose.p function in R. I have 2 queries: 1) dose.p gives me a different answer to Reed-Muench, and actually I suspect wrong answer, given that the dose.p

Re: [R] Populating values from html

2011-06-07 Thread Mike Marchywka
Date: Tue, 7 Jun 2011 03:35:46 -0700 From: ammasamri...@gmail.com To: r-help@r-project.org Subject: [R] Populating values from html can we populate values into an excel sheet from html forms that has to be used in R for data analysis Can we

[R] Draw a Dendrogram

2011-06-07 Thread Ayoub Maatallaoui
Hello, i'm a research student working on everyday sounds classification. i need to draw a dendrogram to show how the classification is done, but while i never used R before, i guess that a help from someone would be great :) does any one of you did something like that before? Thank you --

Re: [R] About DCC-garch model...

2011-06-07 Thread Arun.stat
Dear Windseav, I found that it is quite subjective because the effect of initial value will dilute after couple of time periods, hence whatever value you put there never matters. However I found that common practice is to put the unconditional variance/covariance/correlation for the first period.

Re: [R] Draw a Dendrogram

2011-06-07 Thread Sarah Goslee
Hi Ayoub, You'd be best served by learning how to search and to get help. Within R, ??dendrogram will give you a list of all the functions mentioning dendrogram, while ?dendrogram will give you the help page for the function specifically named dendrogram(). While it can be a bit difficult to

[R] Sorting a data frame with values of different lengths

2011-06-07 Thread William Armstrong
Hi all, I am attempting to run a script in which I permute my data and run a Wilcoxon rank sum test on the data 1000 times and compare my original test statistic to the permuted test statistics to more accurately estimate a significance level for the trends I am observing. In the process of

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread Sarah Goslee
Hi, It looks to me that your data frame is being sorted as text. What does str(W_table) show? How was W_table created? Your W column appears to not be numeric. Sarah On Tue, Jun 7, 2011 at 9:51 AM, William Armstrong william.armstr...@noaa.gov wrote: Hi all, I am attempting to run a script

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread William Armstrong
Hi Sarah, str(W_table) gives me: str(W_table) 'data.frame': 11 obs. of 3 variables: $ pds_gagehandles.i.: Factor w/ 1 level mibe: 1 1 1 1 1 1 1 1 1 1 ... $ p : chr 1 2 3 4 ... $ W : chr 746 870.5 767 1066 ... here is the script I am using, with the lines

Re: [R] Not missing at random

2011-06-07 Thread Joshua Wiley
Hi Blaz, What do you do if the number of values sampled to be set missing (e.g., 4) is greater than the number of values for a given case that are less than your 3 threshold? If no special considerations are needed for that, I do not see why you cannot apply the same technique you did below

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread William Armstrong
Also, I tried changing a line to store W as numeric: sample_info-c(pds_gagehandles[i],p,as.numeric(sample_W)) But it is still sorting incorrectly: W_table[order(W_table$as.numeric.W.),] pds_gagehandles.i. p as.numeric.W. 8mibe 81004.5 1mibe 1

Re: [R] write gene_id in a bed file

2011-06-07 Thread Mohamed Lajnef
Hi Nanami, you do not use the same file in export, href or new_CTTS ? Regards M Le 07/06/11 14:42, ads pit a écrit : Hi all, I have build the following data frame head(href) chr tx_start tx_end g_id strand cds_start cds_end exon_count 1 chr1 8384389 8404227

Re: [R] Question about curve function

2011-06-07 Thread Uwe Ligges
On 07.06.2011 11:57, peter dalgaard wrote: On Jun 6, 2011, at 11:22 , Prof Brian Ripley wrote: As a further example of the trickiness, the function method of plot() relies on curve(x, ...) being a request to plot the function x(x) against x. I've added a comment to that effect to the

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread Sarah Goslee
Hi, On Tue, Jun 7, 2011 at 10:01 AM, William Armstrong william.armstr...@noaa.gov wrote: Hi Sarah, str(W_table) gives me: str(W_table) 'data.frame':   11 obs. of  3 variables:  $ pds_gagehandles.i.: Factor w/ 1 level mibe: 1 1 1 1 1 1 1 1 1 1 ...  $ p                 : chr  1 2 3 4 ...  

Re: [R] Line Graphs

2011-06-07 Thread Robert Baer
I want to plot 6 line graphs. I have 10 points 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 and 1.0. At each point say 0.1, I have 6 variables A, B, C, D, E and F. The variables all have values between 0 and 1 (and including 0 and 1). I also want to label the x axis from 0.1 to 1.0 and the y

Re: [R] Logistic Regression

2011-06-07 Thread Bert Gunter
IMHO, you evidence considerable confusion and misunderstanding of statistical methods. I would say that most of what you describe is nonsense. Of course, maybe I'm just the one who's confused, but I would strongly suggest you consult with a local statistician. This list is unlikely to be able to

Re: [R] Question about curve function

2011-06-07 Thread Matt Shotwell
On Tue, 2011-06-07 at 16:17 +0200, Uwe Ligges wrote: On 07.06.2011 11:57, peter dalgaard wrote: On Jun 6, 2011, at 11:22 , Prof Brian Ripley wrote: As a further example of the trickiness, the function method of plot() relies on curve(x, ...) being a request to plot the function x(x)

Re: [R] rgl: insert pauses in animation sequence / movie formats other than gif?

2011-06-07 Thread Duncan Murdoch
On 07/06/2011 9:24 AM, Michael Friendly wrote: Two questions related to creating animated movies with rgl: 1. I've created an rgl scene with 5 different views I want to display in a movie, but I'd like to insert pauses (say, 5 seconds) at each view. How can I do this? I first created 5

Re: [R] Taking Integral and Optimization using Integrate, Optim and maxNR

2011-06-07 Thread Uwe Ligges
On 06.06.2011 20:14, MARYAM ZOLGHADR wrote: Dear All, Hello! I have some questoins in R programming as follows: Question 1- How to take the integral of this function with respect to y, such that x would appear in the output after taking integral.

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread William Armstrong
Thanks for catching that, Sarah. It seems like the problem was that I was using the c() function to combine terms (including W) that I was adding to a data frame. This caused R to convert the numeric W to a character string. I fixed this by using data.frame() and then rbind() instead of c() and

[R] gam() (in mgcv) with multiple interactions

2011-06-07 Thread Ben Haller
Hi! I'm learning mgcv, and reading Simon Wood's book on GAMs, as recommended to me earlier by some folks on this list. I've run into a question to which I can't find the answer in his book, so I'm hoping somebody here knows. My outcome variable is binary, so I'm doing a binomial fit with

Re: [R] rgl: insert pauses in animation sequence / movie formats other than gif?

2011-06-07 Thread Michael Friendly
On 6/7/2011 10:52 AM, Duncan Murdoch wrote: Something like this works: play3d(par3dinterp(times=c(0,5,6,11,12,17), userMatrix=list(m1,m1,m2,m2,m3,m3), method=linear)) The linear says to use linear interpolation between time points, so it will stay exactly constant

Re: [R] rgl: insert pauses in animation sequence / movie formats other than gif?

2011-06-07 Thread Duncan Murdoch
On 07/06/2011 12:22 PM, Michael Friendly wrote: On 6/7/2011 10:52 AM, Duncan Murdoch wrote: Something like this works: play3d(par3dinterp(times=c(0,5,6,11,12,17), userMatrix=list(m1,m1,m2,m2,m3,m3), method=linear)) The linear says to use linear

[R] Creating a file with reusable functions accessible throughout a computational biology cancer project

2011-06-07 Thread Ben Ganzfried
Hi, My project is set up the following way: root directory contains the following folders: folders: Breast_Cancer AND Colorectal_Cancer AND Lung_Cancer AND Prostate_Cancer I want to create a file, call it: repeating_functions.R and place it in the root directory such that I can call these

Re: [R] Creating a file with reusable functions accessible throughout a computational biology cancer project

2011-06-07 Thread Duncan Murdoch
On 07/06/2011 12:41 PM, Ben Ganzfried wrote: Hi, My project is set up the following way: root directory contains the following folders: folders: Breast_Cancer AND Colorectal_Cancer AND Lung_Cancer AND Prostate_Cancer I want to create a file, call it: repeating_functions.R and place it in

Re: [R] rgl: insert pauses in animation sequence / movie formats other than gif?

2011-06-07 Thread Michael Friendly
On 6/7/2011 12:36 PM, Duncan Murdoch wrote: On 07/06/2011 12:22 PM, Michael Friendly wrote: On 6/7/2011 10:52 AM, Duncan Murdoch wrote: Something like this works: play3d(par3dinterp(times=c(0,5,6,11,12,17), userMatrix=list(m1,m1,m2,m2,m3,m3), method=linear))

[R] predictor raised to a constant power using gnm

2011-06-07 Thread natalia norden
Hi, I'm using the package gnm to perform non-linear models and I cannot find how to write the formula for a power function model. I found out that there was a function Raise() to do this but it no longer exists in the package. I guess I need to use the nonlin function Mult(), but I

Re: [R] Taking Integral and Optimization using Integrate, Optim and maxNR

2011-06-07 Thread Berend Hasselman
Dear All, Hello! I have some questoins in R programming as follows: Question 1- How to take the integral of this function with respect to y, such that x would appear in the output after taking integral. f(x,y)=(0.1766*exp(-exp(y+lnx))*-exp(y+lnx))/(1-exp(-exp(y+lnx))) y in (-6.907,-1.246) It

[R] ggplot2 and facet

2011-06-07 Thread James Rome
I have a data frame (attached) that has interpolated EOT errors for each minute before flight landing. It also has the runway and an index for the flight: times[1:4,] time error runway flight 10 -0.0220623504R 1 21 -0.0796163104R 1 32 -0.1379538004R

Re: [R] Draw a Dendrogram

2011-06-07 Thread Ayoub Maatallaoui
Le 07/06/2011 15:43, Sarah Goslee a écrit : Hi Ayoub, You'd be best served by learning how to search and to get help. Within R, ??dendrogram will give you a list of all the functions mentioning dendrogram, while ?dendrogram will give you the help page for the function specifically named

[R] assign a cluster based on a variable

2011-06-07 Thread Dominik P.H. Kalisch
Hi, I have two matrices of the following form: cluster (n=18): 12062 1 12063 2 12064 2 12065 3 12066 5 KreisSA (n=2304) 12062 12062 12067 12065 12063 12067 I try to assign the cluster[,2] to KreisSAa by the follwoing loop: n - nrow(cluster) KreisSAa - numeric() for(i in 1:n){

Re: [R] ggplot 2: Histogram with bell curve?

2011-06-07 Thread dicko ahmadou
Hi Don't use t as var names, because t is also a function (transpose). This code should work... set.seed(1) T - rnorm(500) qplot(T, geom = blank) + geom_histogram(aes(y = ..density..), colour = black, fill = blue) + stat_density(geom = line, colour = red) -- View this message in context:

[R] count length of continues elements in a vector

2011-06-07 Thread davetracz
I am performing a precipitation analysis. data is in the form of daily precipitation amounts, e.g. x- c(4,5,3,0,0,0,2,4,6,4,0,0,0,2,2,0,3,4,1,0,...) I would like to find the length of the storm, length of storm would be defined as the number of days with continues precipitation. in this case the

[R] Help on selecting genes showing highest variance

2011-06-07 Thread GIS Visitor 33
Hi I have a problem for which I would like to know a solution. I have a gene expression data and I would like to choose only lets say top 200 genes that had the highest expression variance across patients. How do i do this in R? I tried x=apply(leukemiadata,1,var) x1=x[order(-1*x)] but the

[R] Classifying boolean values

2011-06-07 Thread Grifone
Hi to all, I'm new to this forum and new to R. I have to build a tree classifier that has boolean values as response. When I build the tree with: echoknn.tree - tree(class ~ ., data=echoknn.train) where class is a coloumn of my dataset (echoknn.train) of boolean values, the result is a tree

[R] RgoogleMaps Axes

2011-06-07 Thread Erik Gregory
R Help, I posted a question on StackOverflow yesterday regarding an issue I've been having with the RgoogleMaps packages' displaying of axes.  Here is the text of that submission: http://stackoverflow.com/questions/6258408/rgooglemaps-axes I can't find any documentation of the following

Re: [R] About DCC-garch model...

2011-06-07 Thread windseav
Hi Arun, thank you so much for your reply. I have tried to use cor() function in R to calculate the unconditional correlation matrix of my time series, but it is not the same as the calculated first period Dynamic Conditional Correlation matrix by the function dcc.estimation...I don't know

[R] Arima and Sarima Models

2011-06-07 Thread Flavio2f
Dears I would like to know the command line to: 1. plot the periodogram of a time series 2. To calculate a sazonal difference of the 7th order 3. Put the AR or MA term of the 9th order sazonal (or not-sazonal) part. 4. The significance level (P-value) for the estimated parameters of the ARMA(1,1),

[R] Sorting DataFrames

2011-06-07 Thread Cox, Samantha Lucy
I am a new user, and i am trying to sort out a data frame. I have for example bins of data. Within each bin i have multiple counts of animals and the depths at which these count were taken. How would I summarise this to being only the maximum count per bin alongisde the corresponding height

[R] Get RStudio to show line number of error

2011-06-07 Thread idris
Using RStudio 0.93.89 on Windows 7. When I do Run Lines on a segment of code in the Workspace and get an error message displayed in the Console, I want to know what line number the error is on. Is this possible in RStudio or can you suggest another workflow where I can actually know what line my

Re: [R] Sorting Dataframes

2011-06-07 Thread David Winsemius
SamiC wrote: I am a new user, and i am trying to sort out a data frame. I have for example bins of data. Within each bin i have multiple counts of animals and the depths at which these count were taken. How would I summarise this to being only the maximum count per bin alongisde the

Re: [R] Sorting a data frame with values of different lengths

2011-06-07 Thread Tim Smith
William, I think to convert to numeric, you might need to do something like: as.numeric(as.character()) ## and not just as.numeric() As it stands, it would appear that it is still being read as a character string. From: William Armstrong

[R] tab-completion + running R from gedit

2011-06-07 Thread W Kruijer
Dear R-users, having a bit of experience with R under windows, I recently switched to linux (ubuntu 10.4, 64-bit). I'm using gedit 2.30.3 and GNOME Terminal 2.30.2 Everything works fine, except that occasionally gedit and/or the terminal seem to behave strangely. For example: Thr_min - 0

[R] ggplot2 Histogram with density curve

2011-06-07 Thread wwreith
I am learning ggplot2 commands and I have figured out how to create histograms and density curves but I am not sure how to add a density curve on top of a histogram. Here are the two graphs that I created. ## Histogram t-rnorm(500) w-qplot(t, main=Normal Random Sample, fill=I(blue),

[R] giving factor names

2011-06-07 Thread kieran martin
Hi, I've been driving myself insane with this problem. I have a trellis plot of contours, and I want each level to have something like z=value for each one. I can get each one to say z, or each one to say the value (by using as.factor) but not both. Heres an artificial example to show what I mean

[R] Sorting Dataframes

2011-06-07 Thread SamiC
I am a new user, and i am trying to sort out a data frame. I have for example bins of data. Within each bin i have multiple counts of animals and the depths at which these count were taken. How would I summarise this to being only the maximum count per bin alongisde the corresponding height

[R] Setting up a State Space Model in dlm

2011-06-07 Thread Michael Ash
This question pertains to setting up a model in the package dlm (dynamic linear models, http://cran.r-project.org/web/packages/dlm/index.html I have read both the vignette and An R Package for Dynamic Linear Models (http://www.jstatsoft.org/v36/i12/paper), both of which are very helpful. There

[R] ggplot 2: Histogram with bell curve?

2011-06-07 Thread wwreith
I am learning ggplot2 commands specifically qplot for the time being and I have figured out how to create histograms and normal density curves but I am not sure how to add a normal bell curve or other dist. as well on top of a histogram. Here are the two graphs that I created. ## Histogram

Re: [R] Classifying boolean values

2011-06-07 Thread Sarah Goslee
It's likely that class is numeric and you actually want factor (regression tree vs classification tree). str(echoknn.train) will show you. By saying, I have to build a tree classifier you make me think that this is a course assignment. If it is, you should perhaps talk to your instructor. If

[R] MARS for complex samples / survey data?

2011-06-07 Thread JPRISCIANDARO
Hello forum, I am interested in investigating non-linear relationships between variables using something akin to Multivariate Adaptive Regression Splines. The problem is that my data have sample weights and stratification variables, and I don't think earth and similar packages support these.

Re: [R] ggplot2 and facet

2011-06-07 Thread Ista Zahn
Hi James, Specify data = times in the qplot call and get rid of times$ everywhere. For example, do pp2 = qplot(time, error, data = times) pp2 + facet_wrap(~ runway) Best, Ista On Tue, Jun 7, 2011 at 4:01 PM, James Rome jamesr...@gmail.com wrote: I have a data frame  (attached) that has

[R] MARS for complex survey data

2011-06-07 Thread JPRISCIANDARO
Hello forum, I am interested in investigating non-linear relationships between variables using something akin to Multivariate Adaptive Regression Splines. The problem is that my data have sample weights and stratification variables, and I don't think earth and similar packages support these.

[R] WinBUGS on survival, simple but confusing question

2011-06-07 Thread tingtingzhan
Hi All, I'm using WinBUGS on a very simple survival model (log-normal with one covariate Treat), but I cannot understand the way it handles censored data. I'm posting the R file which generates the data from pre-specified parameters, as well as the .bug file. The question is, if I use NA to

Re: [R] count length of continues elements in a vector

2011-06-07 Thread Marc Schwartz
On Jun 7, 2011, at 9:25 AM, davetracz wrote: I am performing a precipitation analysis. data is in the form of daily precipitation amounts, e.g. x- c(4,5,3,0,0,0,2,4,6,4,0,0,0,2,2,0,3,4,1,0,...) I would like to find the length of the storm, length of storm would be defined as the number

Re: [R] Creating a file with reusable functions accessible throughout a computational biology cancer project

2011-06-07 Thread Ben Ganzfried
Thank you very much. This is incredibly helpful, I just added an R package and put a bunch of code in it which works very well. I just had a quick follow-up question. Suppose across the uncurated data-sets, stage of cancer progression is entered in the following way, where the column headers

Re: [R] ggplot 2: Histogram with bell curve?

2011-06-07 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of dicko ahmadou Sent: Tuesday, June 07, 2011 11:41 AM To: r-help@r-project.org Subject: Re: [R] ggplot 2: Histogram with bell curve? Hi Don't use t as var names, because t is

Re: [R] assign a cluster based on a variable

2011-06-07 Thread Uwe Ligges
On 07.06.2011 16:24, Dominik P.H. Kalisch wrote: Hi, I have two matrices of the following form: cluster (n=18): 12062 1 12063 2 12064 2 12065 3 12066 5 KreisSA (n=2304) 12062 12062 12067 12065 12063 12067 I try to assign the cluster[,2] to KreisSAa by the follwoing loop: n - nrow(cluster)

Re: [R] Bigining with a Program of SVR

2011-06-07 Thread ypriverol
Well: I programmed an script in R using caret package and the results are very interesting ... I have two datasets the first dataset have a linear distribution experimentaly: values are: 4.3 , 5.3, 6.3.. 10.3... the svmRadial kernel work perfectly and I can obtain an R2 = 0.98 between the

[R] Error message

2011-06-07 Thread Parida, Mrutyunjaya
Hi fn - dir(pattern=txt,full.name=T) fn [1] ./GSM696980_US81503234_252741110209_S01_CGH_107_Sep09_1_1_32914.txt [2] ./GSM696981_US81503234_252741110209_S01_CGH_107_Sep09_1_2_32916.txt [3] ./GSM696982_US81503234_252741110209_S01_CGH_107_Sep09_1_3_33021.txt [4]

[R] Regular Expressions for Large Data Set

2011-06-07 Thread Abraham Mathew
I'm running R 2.13 on Ubuntu 10.10 I have a data set which is comprised of character strings. site = readLines('http://www.census.gov/tiger/tms/gazetteer/zips.txt') dat - c(01, 35004, AL, ACMAR, 86.51557, 33.584132, 6055, 0.001499) dat I want to loop through the data and construct a data frame

[R] Generic function to split a vector by user defined values

2011-06-07 Thread Marc Schwartz
Hi all, In follow up to my reply regarding splitting/grouping a vector: https://stat.ethz.ch/pipermail/r-help/2011-June/280361.html it seems logical that a generic approach might be useful. So here is one possibility, which I present for use and improvement as may be appropriate. x : a

Re: [R] ggplot2 and facet

2011-06-07 Thread James Rome
Times is extracted from a larger data frame with the city in it also, so the variables are not unique. But I tried what you suggested, and get pp2 = qplot(time, error, times) pp2 = pp2 + facet_wrap(~ runway) print(pp2) Error in eval(expr, envir, enclos) : object 'error' not found

Re: [R] Regular Expressions for Large Data Set

2011-06-07 Thread Marc Schwartz
On Jun 7, 2011, at 3:55 PM, Abraham Mathew wrote: I'm running R 2.13 on Ubuntu 10.10 I have a data set which is comprised of character strings. site = readLines('http://www.census.gov/tiger/tms/gazetteer/zips.txt') dat - c(01, 35004, AL, ACMAR, 86.51557, 33.584132, 6055, 0.001499) dat

Re: [R] ggplot2 and facet

2011-06-07 Thread James Rome
Something is very strange: pp2 = qplot(time, error, times) plot(pp2) Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y' On 6/7/2011 4:12 PM, Ista Zahn wrote: Hi James, Specify data = times in the qplot call and get rid of times$ everywhere.

Re: [R] ggplot2 and facet

2011-06-07 Thread Ista Zahn
Hi James, On Tue, Jun 7, 2011 at 5:12 PM, James Rome jamesr...@gmail.com wrote: Times is extracted from a larger data frame with the city in it also, so the variables are not unique. But I tried what you suggested, and get     pp2 = qplot(time, error, times)     pp2 = pp2 + facet_wrap(~

Re: [R] Error message

2011-06-07 Thread Martin Morgan
On 06/07/2011 01:38 PM, Parida, Mrutyunjaya wrote: Hi fn- dir(pattern=txt,full.name=T) fn [1] ./GSM696980_US81503234_252741110209_S01_CGH_107_Sep09_1_1_32914.txt [2] ./GSM696981_US81503234_252741110209_S01_CGH_107_Sep09_1_2_32916.txt [3]

Re: [R] Sorting Dataframes

2011-06-07 Thread SamiC
So I have figured out how to do it via a series of loops and conditions, but i am thinking there must be a quicker way to do it. an example. Bin Depth Fish to: Bin DepthMaxFish 1 4 2 1 8 24 1 8

Re: [R] Line Graphs

2011-06-07 Thread Robert Baer
Thanks Rob, but the legend is not appearing in the plot. I think the best place for it is on the top left. Is there anyway I can also get it broken down in tenths instead of fifths? The legend is easy; just specify where you want it. The first 2 parameters specify the x, y of the top left

Re: [R] Sorting Dataframes

2011-06-07 Thread David A. Johnston
Here's one way: # Here I read in your data to a variable 'x' x = read.delim(textConnection( Bin Depth Fish 1 4 2 1 8 24 1 12 4 2 4 3 2 8 21 2 12 2 3 4 12 3 8 2 3 12 33), sep = , header = TRUE) do.call(rbind, lapply(split(x, x$Bin), function(grp) grp[which.max(grp$Fish),])) -- View this

Re: [R] About DCC-garch model...

2011-06-07 Thread Marcin P?�ciennik
Hi, I thought that a common practice is just to ommit the first period data since it does not have much influence on further results / calculations. Cheers Marcin 2011/6/7 windseav winds...@gmail.com Hi, everyone, I currently run into a problem about DCC-Garch model. I use the package

Re: [R] ggplot 2: Histogram with bell curve?

2011-06-07 Thread dicko ahmadou
my badyou are right I always use TRUE instead of T, so i forgot that by default T = TRUE in R. -- View this message in context: http://r.789695.n4.nabble.com/ggplot-2-Histogram-with-bell-curve-tp3580359p3581032.html Sent from the R help mailing list archive at Nabble.com.

[R] Adding values to the end of a data frame

2011-06-07 Thread Abraham Mathew
Let's say that I'm trying to write a functions that will allow me to automate a process where I examine all possible combinations of various string groupings. Each time I run the one function, I want to include the new values to the end of a data frame. The data frame will basically be one column

[R] XML segfault on some architectures

2011-06-07 Thread Janet Young
Hi, I found an architecture-specific segfault problem with the XML package. I originally found the problem using the parseKGML2Graph function in the Bioconductor KEGGgraph package, but as far as I can tell the underlying issue seems to be with the xmlTreeParse which is called by

[R] Cleveland dot plots

2011-06-07 Thread Colin Wahl
I would rather use cleveland dot plots than bar charts to display my study results. I have not been able to find (or figure out) an R package that is capable of producing the publication quality dot charts Im looking for. I have either not been able to get error bars (lattice), cannot order the

[R] predict with model (rms package)

2011-06-07 Thread Mark Seeto
Dear R-help, In the rms package, I have fitted an ols model with a variable represented as a restricted cubic spline, with the knot locations specified as a previously defined vector. When I save the model object and open it in another workspace which does not contain the vector of knot

Re: [R] Sorting DataFrames

2011-06-07 Thread Ethan Brown
Hello Samantha, I'm having some trouble understanding your question in terms of what's happening in R. Are these bins columns of a data.frame? Rows? It's helpful for us to have a small example to look at--for instance, you could create a small subset of your data called x, then type the command

Re: [R] Sorting Dataframes

2011-06-07 Thread Dennis Murphy
Hi: Here's another approach using the plyr package: # Write a function that takes a data frame as input and outputs a data frame f - function(df) df[which.max(df$Fish), ] ddply(x, 'Bin', f) Bin Depth Fish 1 1 8 24 2 2 8 21 3 312 33 HTH, Dennis On Tue, Jun 7, 2011 at

Re: [R] Adding values to the end of a data frame

2011-06-07 Thread Dennis Murphy
Alas, you don't have a suffix2 object defined, but try this: d1 - one(prefix, roots) d2 - one(roots, suffix) rbind(d1, d2) To see a potential flaw in your function (as least as far as console output is concerned), try rbind(d1, one(roots, suffix)) HTH, Dennis On Tue, Jun 7, 2011 at 3:30 PM,

Re: [R] Problem with Princurve

2011-06-07 Thread guy33
As suggested above, specifying useful starting points definitely helps in the case of: 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 Interestingly, I find that if you

Re: [R] Problem with Princurve

2011-06-07 Thread guy33
guy33 wrote: As suggested above, specifying useful starting points definitely helps in the case of: 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

Re: [R] Cleveland dot plots

2011-06-07 Thread Peter Alspach
Kia ora Colin I don't know if there is a package that does what you want, but they are easy enough to create using plot(). Error bars can be added with arrows(). HTH ... Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On

  1   2   >