Displaying 20 results from an estimated 1000 matches similar to: "limiting simulated animal movement"
2006 Sep 22
4
Creating Movies with R
Dear All,
I'd like to know if it is possible to create animations with R.
To be specific, I attach a code I am using for my research to plot
some analytical results in 3D using the lattice package. It is not
necessary to go through the code.
Simply, it plots some 3D density profiles at two different times
selected by the user.
I wonder if it is possible to use the data generated for different
2004 Oct 25
1
Ref: Variable scope or function behaviour or array reassign
Dear R- helpers
Following a draft structure of the R script for which I am facing problem
Step 1
x <- of type array with original values
y <- of type array with original values
Step 2
for (ctr in 1:10) {
# my problem here the both x and y still show the original values from step 1
# in spite of making changes to the old values of the arrays x and y in the function
function
2010 Aug 13
2
Unable to retrieve residual sum of squares from nls output
Colleagues,
I am using "nls" successfully (2.11.1, OS X) but I am having difficulties retrieving part of the output - residual sum of squares. I have assigned the output to FIT:
> > FIT
> Nonlinear regression model
> model: NEWY ~ PMESOR + PAMPLITUDE * cos(2 * pi * (NEWX - POFFSET)/PERIOD)
> data: parent.frame()
> PMESOR PAMPLITUDE POFFSET
>
2008 Jan 04
1
Plotting labeled impulses: label collision
Dear all,
As you can see from the attachment I'm using R to automatically annotate
peptide fragmentation mass spectra, which are represented by impulse plots.
I'd like to poll you on approaches of how to deal as generally as possible
with the two biggest annotation issues I run into:
1) very close annotated masses (impulses) with similar y-axis dimensions -
resulting in overlapping labels
2010 Aug 19
2
Can't read/write to _nonfi
Good afternoon,
Hope you all have a wonderful day. I am glad to be here. Hope you could
help me with the following errors that i have been trying to figure it all
out since last week.
I am using Splus from Insightful, and as i read, R and Splus are very
similar. So hope you could help me.
I have been continously received these error messages after i ran my small
program for couple of
2011 Oct 05
4
SPlus to R
I'm trying to convert an S-Plus program to R. Since I'm a SAS programmer I'm not facile is either S-Plus or R, so I need some help. All I did was convert the underscores in S-Plus to the assignment operator <-. Here are the first few lines of the S-Plus file:
sshc _ function(rc, nc, d, method, alpha=0.05, power=0.8,
tol=0.01, tol1=.0001, tol2=.005, cc=c(.1,2),
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
Thanks for the reproducable example. I can confirm that it fails on my machine using
survival 2-37.5, the next soon-to-be-released version,
The issue is with NextMethod, and my assumption that the called routine inherited
everything from the parent, including the environment chain. A simple test this AM showed
me that the assumption is false. It might have been true for Splus. Working this
2006 Jul 29
1
fancier plotting
Hi
thank you for talking the time to help me with this.
I have a sequence of numbers in a file and an equal sequence of various character, say(a b c d) each occurs more than once. I need to plot the numbers so that numbers corresponding to a in the other sequence would have green dots, those corresponding to b a red dot, nothing on c and blue square for d. i.e
2 a show a green dot
4 b show a
2003 Dec 09
1
How to append to a data.frame?
Hi,
I have a data.frame that I need to construct iteratively.
At the moment, I'm doing:
d<-data.frame(x=c(),y=c(),z=());
# {and, within some loop}
d<-rbind(d,data.frame(x=newx,y=newy,z=newz);
While this works, it is horribly verbose and probably not efficient, either.
My real data.frame has, of course, many more columns, which can be of
different modes.
I vaguely recall that
2007 Jan 21
2
efficient code. how to reduce running time?
Hi,
I am new to R.
and even though I've made my code to run and do what it needs to .
It is taking forever and I can't use it like this.
I was wondering if you could help me find ways to fix the code to run
faster.
Here are my codes..
the data set is a bunch of 0s and 1s in a data.frame.
What I am doing is this.
I pick a column and make up a new column Y with values associated with that
2011 Mar 30
3
Connect observed values by a smooth curve, is there any method to get coordinate value of arbitrary point on the curve?
Dear all,
I have the problem as the title shows. It is time series of measurements. I
want to estimate the value at time point when we have no actual measured
value (Only in the time range, not for prediction in future time).
Hope you could give me some suggestion or hint. Thank you so much.
Wang Zhipeng
[[alternative HTML version deleted]]
2010 Oct 06
1
R getting slower until it breaks...
Hello R-users,
I'm currently facing a pretty hard problem which I'm hopping you'll be able to help me with. I'm using R to create images. That alone is not the problem, the problem is that I'm using R to create 168 000 images... My code (which is given below) use different package (raster and rgdal) to import a image (size 20gig) and divide it into 168 000 pictures that are
2007 Apr 12
2
Bug with kde applications and damageWindowRect wrapping...
Here is a bug that make me insane since a lot of time.
Randomly, when launching an kde application, i can see it appear on screen
and then being placed by place plugin.
I look at place plugin code and everything looks ok...
http://hibbert.univ-lille3.fr/~cbellegarde/PlacementBug.png
Here a screenshot of the bug, as you can see, window first appear at this
"non placed" position, then, it
2007 Jul 02
2
how to use mle with a defined function
Hi all,
I am trying to use mle() to find a self-defined function. Here is my
function:
test <- function(a=0.1, b=0.1, c=0.001, e=0.2){
# omega is the known covariance matrix, Y is the response vector, X is the
explanatory matrix
odet = unlist(determinant(omega))[1]
# do cholesky decomposition
C = chol(omega)
# transform data
U = t(C)%*%Y
WW=t(C)%*%X
beta = lm(U~W)$coef
Z=Y-X%*%beta
2023 Jun 28
1
horizontal grouped stacked plots and removing space between bars
I have code like this:
data <- read.csv("test1.csv", stringsAsFactors=FALSE, header=TRUE)
# Graph
myplot=ggplot(data, aes(fill=condition, y=value, x=condition)) +
geom_bar(position="dodge", stat="identity", width=0.5) +
scale_fill_manual(values=c("#7b3294", "#c2a5cf", "#a6dba0", "#008837"))+
2023 Jun 16
1
Issue with crammed Y axis
Hi,
I have a data frame like this:
> dput(df)
structure(list(ID = 1:8, Type = c("gmx mdrun -ntmpi 8 -ntomp 1 -s
benchPEP.tpr -nsteps 10000 -resethway",
"gmx mdrun -ntmpi 8 -ntomp 1 -s benchPEP.tpr -nsteps 10000 -resethway",
"gmx mdrun -ntmpi 8 -s benchPEP.tpr -nsteps 4000 -resetstep 3000",
"gmx mdrun -ntmpi 8 -s benchPEP.tpr -nsteps 4000 -resetstep
2009 Jan 28
1
Neighborhood distance calculator
Hi all,
I am new to R, hence this question. I have a set of points with X and
Y coordinates. I would like to build an R code to calculate the
distances of points within a specified neighborhood (circular range)
for each point. I would like the code to be a function, so that I can
call the function, specifying parameters (data file, distance), from
another piece of code. Also, I would like the
2007 Sep 18
2
How to Standardise the x/y coordinates to the unit square?
Dear Rusers, I want to standardise the values of x/y coordinates to the unit square, i.e. make the x-values all lie within [0,1] and all the y-values lie within [0,1] in the bottom example. I had thought to use scale() function to do it, but it seems that it's used to standardise a variable and the scaled value was not within [0,1]. OR, i can divide x/y-values by their maximum value to get
2007 Nov 22
2
manual parallel processing
Hi;
I have a R script that includes a call to genoud(); genoud process lasts
about 4 seconds, what would be OK if I hadn't have to call it about 2000
times. This yields about 2 hours of processing.
And I would like to use this script operationally; so that it should be
run twice a day. It seems to me that the parallel processing option
included in genoud() divides the task inside the function
2007 Feb 20
1
text.rpart for the "class" method doesn't act on label="yprob"
Hello All,
Am I misreading the documentation?
The text.rpart documentation says:
"label a column name of x$frame; values of this will label the nodes. For
the "class" method, label="yval" results in the factor levels being
used, "yprob" results in the probability of the winning factor level being
used, and ?specific yval level? results in the probability of