Displaying 20 results from an estimated 3000 matches similar to: "Recursive decreasing sequences"
2006 Oct 20
0
R sequence function (was: Re: [R] Recursive decreasing sequences)
This seems a lot faster than using the R sequence function. Suggest
that sequence be rewritten.
On 10/20/06, Marc Schwartz <MSchwartz at mn.rr.com> wrote:
> On Fri, 2006-10-20 at 12:51 -0700, Julian Burgos wrote:
> > Hello fellow R's,
> >
> > I'm sure there must be an easy way to do this. But after digging in the
> > documentation and thinking about it
2007 Jul 20
3
SOS
Dear all, I am a new user of R. I would like to know how to get fund's returns in percentage (%). For example, I use: R <- ts(read.xls("FundData"), frequency = 12, start = c(1996, 1)) Whith this program, the returns are like 0.0152699. But, I would like to have 1.52%. Please advise me about the function. Thanks! Fabrice
2010 May 20
1
Strange behaviour when using diff with POSIXt and POSIXlt objects
Dear list,
I´m calculating time differences between series of time stamps and I noticed
something odd:
If I do this...
> time1=strptime("2009 05 31 22 57 00",format="%Y %m %d %H %M")
> time2=strptime("2009 05 31 23 07 00",format="%Y %m %d %H %M")
>
> diff(c(time1,time2),units="mins")
Time difference of 10 mins
.. I get the correct
2005 Nov 09
2
Variograms and large distances
Hello R list,
I need to compute empirical variograms using data from a large
geographic area (~10^6 km2). Although I could not find a specific
reference, I assume that both geoR and gstat calculate distances among
data points assuming points are on a flat surface (using the Pythagorean
Theorem). Because the location of my data is large and located near the
pole, assuming that latitude and
2007 Nov 14
2
About print a label in plot
Dear list,
Hello! I have a question about how to print a label in the plot.
I am using the following code:
<pdf("mel4_chr3_11cancer_cghFLasso.pdf", height=6,
width=5);plot(Disease.FL, index=i, type="Single",main="Plot of
Labels");dev.off();
But "Plot of Labels" has not been printed. Any suggestions?
Thanks a lot!
Allen
2007 Aug 14
1
weights in GAMs (package mgcv)
Dear list,
I?m using the ?mgcv? package to fit some GAMs. Some of my covariates are
derived quantities and have an associated standard error, so I would
like to incorporate this uncertainty into the GAM estimation process.
Ideally, during the estimation process less importance would be given to
observations whose covariates have high standard errors.
The gam() function in the ?mgcv? package
2009 Sep 14
1
ggplot2 legend text....a basic question
Hello fellow R's,
I?ve been learning to use the ggplot2 library, and after a full day of
work I still have a couple of basic questions.
Here is an example:
mydata=data.frame(x=runif(20),y=runif(20),n=runif(20))
mydata2=data.frame(x=c(0.4,0.6,0.5),y=c(0.4,0.4,0.6))
ggplot(mydata, aes(x, y)) + geom_point(aes(size = n)) +
geom_polygon(data=mydata2,aes(x,y,alpha=0.5))
In this plot, the
2007 Aug 30
4
How to measure mode (central tendancy)
What is the name of the function to give me the mode (central tendancy) of a
numeric variable that can be negative?
[[alternative HTML version deleted]]
2007 Jun 21
1
mgcv: lowest estimated degrees of freedom
Dear list,
I do apologize if these are basic questions. I am fitting some GAM
models using the mgcv package and following the model selection criteria
proposed by Wood and Augustin (2002, Ecol. Model. 157, p. 157-177). One
criterion to decide if a term should be dropped from a model is if the
estimated degrees of freedom (EDF) for the term are close to their lower
limit.
What would be the
2006 Jun 23
1
Running executable files from R
Hello fellow R's,
I apologize if this question was answer elsewhere. I have an executable
file that I need to run from R. Basically I want to use R to create the
input files this executable requires, then run it, and finally use R
again to analyze the output files. Because I have to do this many times
I'd like to have the R code call the executable file after the input
files are
2007 Oct 24
3
jEdit for R
Hi,
I just installed jEdit but have no clue, whether I can run my code a'la
"ctrl-R" directly from jEdit script, or should source it from R command
line, after saving it first in jEdit.
thanks for any help,
rob
--
View this message in context: http://www.nabble.com/jEdit-for-R-tf4684065.html#a13384782
Sent from the R help mailing list archive at Nabble.com.
2007 Dec 14
1
detailed calculation of two way anova with unbalanced design
Dear list,
Could someone show me where can I find the detailed formula on how to
calculate the two way anova with unbalanced design? Say, if I have 2*2
design with 10,20,30,40 samples in each of the 2*2 cells. Most of the places
I've googled only show how to calculate using software such as R, but not
clear the detailed formula for calculating this.
Thanks,
Jack
[[alternative HTML version
2007 Aug 07
2
Spatial sampling problem
Hi All,
I am new in R and trying to simulate random normal 2D field with mean trend say north-south. My domain is 10x10 grid and I am trying to use mvnorm but do not know how to specify the domain and the mean field.
I would appreciate any help.
Cheers, SK
---------------------------------
[[alternative HTML version deleted]]
2008 May 29
2
Plot colors
Hi. I am plotting graphs for values ranging between -1 and 10, for example:
(1,2,1,1,6,7,-1,-1,5,-1)
I am trying to plot the graphs so that the points with value of -1 will be
in one specific color, and the rest of the points will be in one different
specific color. I would be grateful for any idea of how to do that in two
colors.
Thanks for any hint.
--
View this message in context:
2012 Jun 20
2
passing function parameters into a 'with' statement to dynamically pick out columns
Hi,
I've built a function to generate plots and would like to be able pass in column names as a parameter. Here's a boiled down version of what I have right now:
pmts <- data.frame(date=c(1,2,3), all=c(5,6,7),maj=c(4,5,6),ind=c(3,4,5))
perc.mktshare <- function(df){
range1 <- floor(min(with(df, 100*ind/all)))
range2 <- ceiling(max(with(df, 100*ind/all)))
2007 Nov 14
3
How to get row numbers of a subset of rows
Hello list,
I read in a txt file using
<B<-read.table(file="data.snp",header=TRUE,row.names=NULL)
by specifying the row.names=NULL so that the rows are numbered.
Below is an example after how the table looks like using
<B[1:10,1:3]
SNP Chromosome PhysicalPosition
1 SNP_A-1909444 1 7924293
2 SNP_A-2237149 1 8173763
2007 Aug 14
2
labelling plots with ancillary data in data.frame
Hi All,
I am busy using R to do some regression modelling and have been using plot(x,y,"") to visualise my variables. I would now like to label my points using data stored in the data.frame used for the regression analysis. For example each of my data points is made up of a field measured forest volume value and a remotely sensed vegetation estimate (NDVI). Each point is an enumeration
2009 Sep 21
3
compute differences
Hi,
I have a problem.
I have a data frame looking like:
ID val
A? .3
B? 1.2
C? 3.4
D? 2.2
E? 2.0
I need to CREATE the following TABLE:
CASE?? DIFF
A-A??? 0
A-B??? -0.9
A-C??? -3.1
A-D??? -1.9
A-E??? -1.7
B-A??? ...
B-B??? ...
B-C
B-D
B-E
C-A
C-B
C-C
C-D
C-E
D-A
D-B
D-C
D-D
D-E
E-A
E-B
E-C
E-D
E-E
WHERE CASE IS THE COUPLE OF ELEMENTS CONSIDEREDM AND DIFF IS THE computed DIFFERENCE between
2007 Dec 07
4
if/else for plot/lines?
I'm interested in writing a function that constructs a new plot on the
current graphics device if no plot exists there yet, but adds lines to
the existing plot if a plot is already there. How can I do this? It
seems to me that the exists() function might be co-opted to do this, but
it's not obvious how.
Many thanks,
Roger
--
Roger Levy Email: rlevy at ucsd.edu
2007 Jul 18
3
How to open an URL using RGtk2
Hi
I am working on R 2.5.0 on window. I am trying to provide a Hyper-link to
the user as a result, I have tried using gtkLinkButton to exercise the
facility, however, i am not able to perform the required task, i.e. when I
clicked on the LinkButton actually nothing happened.
I have gone through the documentation for the same and found that
GtkLinkButtonUriFunc is a function which is require to