On 02/14/2012 06:19 AM, Michael Methlagl wrote:
Hi everybody,
i made a scatterplot using the command
plot (datafile1, xlim=c(0,10), ylim=c(0.001, 1), log=y, xlab=x Achse, ylab=y
Achse, frame.plot=FALSE, axes = TRUE).
Now i have a problem. There is a gap between the x and the y axis. I want
Dear Wei:
When I have a matrix s, with each column represents a sequence. I want to
recover all equivalent sequences from the sequences/columns in s. I used this
command
do.call(cbind,apply(s,2,function(x) getEquivalent(x,tt)))
This did a good job when ncol(s) 1, but when ncol(s)=1,
On 02/14/2012 08:59 AM, Cem Girit wrote:
Hello,
This is my first attempt to write a script in R. The program below
is intended to do some parametric tests on group data. There are subroutines
for each type of test. The call to the parametric.tests, routine sets the
argument testtype for
Hi all,
I've been having a look to all OOP functionallity in R, basically I've been
reading Statistics and Computing book by Chambers. My problem is that I'm
thinking about refactoring many functions of the applications I work with
(which is quite huge), in order to modularize its components. I
I want to install the R package packfor on my library in R (R-2.14.0), but I
can not download it from http://r-forge.r-project.org/R/?group_id=195. Is it
because of the Building status? Were can I get packfor from?
Thanks a lot,
Krista
--
__
That's interesting. Playing with the example, it doesn't seem to be a
local minimum. I think that this happens because, although the higher
rank basis contains the lower rank basis, the penalty can not simply
suppress all the extra components in the higher rank basis and recover
exactly what
On Tue, 14 Feb 2012, Krista Köllner wrote:
I want to install the R package packfor on my library in R (R-2.14.0),
but I can not download it from
http://r-forge.r-project.org/R/?group_id=195. Is it because of the
Building status?
Yes, exactly.
Were can I get packfor from?
The last
Dear R-users
--
-- Heather Anne
---
Heather A. Wright, PhD candidate
Ecology and Evolution of Plankton
Stazione Zoologica Anton Dohrn
Villa Comunale
80121 - Napoli, Italy
I have this matrix in R,
s1 s2 s3 s4
g1 1 0 0 0
g1 0 1 0 0
g1 0 0 1 0
g2 1 0 0 0
g2 0 1 0 0
g3 1 0 0 0
g4 0 0 1 0
g4 1 0 0 0
g4 0 1 0 0
g4 0 0 0 1
I want to split this matrix based on its rows then sum based on columns,
finally I want to make this
Perhaps something (untested) like
sapply(split(x, rownames(x)), colSums)
Next time it's suggested you use dput() to send your data.
Michael
On Tue, Feb 14, 2012 at 7:08 AM, Soheila Khodakarim
lkhodaka...@gmail.com wrote:
I have this matrix in R,
s1 s2 s3 s4
g1 1 0 0 0
g1 0 1 0
Hi Greg,
Recent mgcv versions use extended quasi-likelihood in place of the
likelihood for (Laplace approx) REML with quasi families (e.g. McCullagh
and Nelder, GLM book 2nd ed section 9.6): this fixes the problems with
trying to use the quasi-likelihood directly with REML.
best,
Simon
On
Hi,
according to ?rvm the relevance vector machine function as implemented in the
kernlab-package
has an argument 'cross' with which you can perform k-fold cross validation.
However, when I try to add a 10-fold cross validation I get the following error
message:
Error in match.arg(type,
On 12-02-14 12:34 AM, Ben quant wrote:
Hello,
I can get at environments if I know their names, but what if want to look
at what environments currently exist at some point in a script? In other
words, if I don't know what environments exist and I don't know their
sequence/hierarchy, how do I
On 12-02-13 6:02 PM, Cleridy Lennert wrote:
Dear All -
The problem: comment lines in an R function (lines beginning with # ) are
*sometimes* removed on leaving the R default editor (same with notepad).
I'm working on a Windows machine with R version 2.14.1.
An example is below. Couldn't find
Yes, I just checked out the bootstrap package: the problem is that it
passes vectors (not matrices) to your function and thats why you get
the error you do. Just use diff() instead of apply(,, diff) in your
function and you'll be fine.
Michael
On Mon, Feb 13, 2012 at 12:48 PM, hithit168
On 12-02-13 2:27 PM, Duncan Murdoch wrote:
On 06/02/2012 4:12 PM, Hadley Wickham wrote:
2. It's more flexible to construct the language object as a language object,
rather than pasting something together and parsing it. For one thing, that
allows non-syntactic variable names; I think
Dear R-helpers,
I created an own function which looks like this
s_elternmz - function(Var=balt)
{
Dg_a-mz[,c(asbhh,apkz,Var)]
colnames(Dg_a)[colnames(Dg_a)==apkz]-bpkzm
colnames(Dg_a)[colnames(Dg_a)==Var]-paste(Var,_m,sep=)
mz_int-merge(mz,Dg_a,by=c(asbhh,bpkzm),all.x=T)
On 2/13/2012 11:15 AM, Duncan Murdoch wrote:
On 13/02/2012 9:24 AM, Sebastian Schubert wrote:
Hi,
I would like plot two surfaces which are each given by vectors x and y,
and a matrix m(x,y) representing the z coordinate. With persp() I can
plot both, using par(new=TRUE) I can put it in one
thanks Simon
I'll upgrade R to try t2. The data I'm actually analysing requires scaled
Poisson so I don't think REML is an option.
thanks
Greg
On 14/02/12 11:22 Simon Wood wrote:
That's interesting. Playing with the example, it doesn't seem to be a
local minimum. I think that this happens
I have some data files e.g 100 . and after for loop I would like to save all
data in one single data frame
file_s - list.files(path = ., pattern = v2.0.2.txt, all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE)
for (i in 1:100){
I have a data set that looks like this:
ID STRATA G_F_Bl Dkl N g_pr_dklN_haG_ha
20,103 2 1 5 5 0,002 250 0,5
20,103 2 1 7 3 0,0038 150 0,57
20,103 2 1 9 6 0,0064 300 1,92
20,103
Hello!
I have several variables. Each of them has a different distribution. I was
thinking to use a Generalized Linear Model, glm(), but I need to introduce
the family. Do you know if R has any tests for matching data to any
distribution ( I am aware of shapiro.test).
All the best,
--
BAS
I am using R 2.14.1. I am trying to configure Lyx with Sweave. I have read
articles but I found none to be complete and I cannot import sweave
document in lyx . Can anyone please help me with a stepwise procedure how to
configure Lyx with Sweave so that I can run my R-code chunks from LYX ,the
Basic question (if you know the answer)... I am dealing with a list of
commonly-formatted sub-lists, for example:
l - list()
l[[1]] - c(A1,A2,A3)
l[[2]] - c(B1,B2,B3)
l[[3]] - c(C1,B2,B3)
Lets say I need to extract every 2nd item (i.e. A2, B2, C2). [[]] cannot be
used. l[2] returns
On 14/02/2012 9:19 AM, Michael Friendly wrote:
On 2/13/2012 11:15 AM, Duncan Murdoch wrote:
On 13/02/2012 9:24 AM, Sebastian Schubert wrote:
Hi,
I would like plot two surfaces which are each given by vectors x and y,
and a matrix m(x,y) representing the z coordinate. With persp() I can
On Feb 14, 2012, at 9:20 AM, Marion Wenty wrote:
Dear R-helpers,
I created an own function which looks like this
s_elternmz - function(Var=balt)
{
Dg_a-mz[,c(asbhh,apkz,Var)]
colnames(Dg_a)[colnames(Dg_a)==apkz]-bpkzm
colnames(Dg_a)[colnames(Dg_a)==Var]-paste(Var,_m,sep=)
On 14/02/2012 7:41 AM, ATANU wrote:
I am using R 2.14.1. I am trying to configure Lyx with Sweave. I have read
articles but I found none to be complete and I cannot import sweave
document in lyx . Can anyone please help me with a stepwise procedure how to
configure Lyx with Sweave so that I can
How about:
l - list()
l[[1]] - c(A1,A2,A3)
l[[2]] - c(B1,B2,B3)
l[[3]] - c(C1,B2,B3)
lapply(l, [[, 2)
or
sapply(l, [[, 2)
I hope it helps.
Best,
Dimitris
On 2/14/2012 2:44 PM, geotheory wrote:
Basic question (if you know the answer)... I am dealing with a list of
commonly-formatted
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 14/02/12 13:41, ATANU wrote:
I am using R 2.14.1. I am trying to configure Lyx with Sweave. I
have read articles but I found none to be complete and I cannot
import sweave document in lyx . Can anyone please help me with a
stepwise
Hi,
I'd like to know if it is possible to use wildcards * for indexing...
E.g. I have a vector of strings. Now I'd like to select all elements
which start with A_*? I'd also need to combine that with logical operators:
Select all elements of a vector that start with A (A*) OR that start with B
On Feb 14, 2012, at 8:44 AM, geotheory wrote:
Basic question (if you know the answer)... I am dealing with a list
of
commonly-formatted sub-lists, for example:
l - list()
l[[1]] - c(A1,A2,A3)
l[[2]] - c(B1,B2,B3)
l[[3]] - c(C1,B2,B3)
Lets say I need to extract every 2nd item (i.e. A2, B2,
On 14/02/2012 9:54 AM, Johannes Radinger wrote:
Hi,
I'd like to know if it is possible to use wildcards * for indexing...
E.g. I have a vector of strings. Now I'd like to select all elements
which start with A_*? I'd also need to combine that with logical operators:
Select all elements of a
I think the grep()-family (regular expressions) will be the easiest
way to do this, though it sounds like you might prefer grepl() which
returns a logical vector:
^[AB] # Starts with either an A or a B
^A_ # Starting with A_
a - c(A_A,A_B,C_A,BB,A_Asd
grepl(^[AB], a)
grepl(^A_)
Michael
On
Hi,
On Tue, Feb 14, 2012 at 9:54 AM, Johannes Radinger jradin...@gmx.at wrote:
Hi,
I'd like to know if it is possible to use wildcards * for indexing...
E.g. I have a vector of strings. Now I'd like to select all elements
which start with A_*? I'd also need to combine that with logical
try this:
file_s - list.files(path = ., pattern = v2.0.2.txt, all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE)
result - do.call(rbind, lapply(file_s, function(.file){
data - read.table(.file, header=TRUE)
data.frame(lat =
On Feb 14, 2012, at 9:44 AM, Duncan Murdoch wrote:
On 14/02/2012 7:41 AM, ATANU wrote:
I am using R 2.14.1. I am trying to configure Lyx with Sweave. I
have read
articles but I found none to be complete and I cannot import sweave
document in lyx . Can anyone please help me with a stepwise
I want to fit discrete data that was measured on a wavegenerator.
In this minimal example i generate some artificial data:
testsin - 2+ 5 * sin(1:100) #generate sin data
testsin - testsin+ rnorm(length(testsin), sd = 0.01) #add noise
mydata - list(X=1:100, Y=testsin) # generate mydata object
On 2/11/2012 12:00 PM, ilai wrote:
You are setting a new class (inflmlm) at the end of mlm.influence.
Remove that second to last line and enjoy your new S3 method.
Thanks for the suggestion, but it doesn't help -- I still get the same
behavior whether mlm.influence returns a classed object or
Hi,
Original-Nachricht
Datum: Tue, 14 Feb 2012 09:59:39 -0500
Von: R. Michael Weylandt michael.weyla...@gmail.com
An: Johannes Radinger jradin...@gmx.at
CC: R-help@r-project.org
Betreff: Re: [R] Wildcard for indexing?
I think the grep()-family (regular expressions) will
Hi Jonas,
I'm afraid we need more detail.
On Mon, Feb 13, 2012 at 5:54 PM, Jonas Stein n...@jonasstein.de wrote:
I want to fit discrete data that was measured on a wavegenerator.
In this minimal example i generate some artificial data:
testsin - 2+ 5 * sin(1:100) #generate sin data
testsin
Hi,
You should probably do a bit of reading about regular expressions, but
here's one way:
On Tue, Feb 14, 2012 at 10:10 AM, Johannes Radinger jradin...@gmx.at wrote:
Hi,
Original-Nachricht
Datum: Tue, 14 Feb 2012 09:59:39 -0500
Von: R. Michael Weylandt
Don't you want to predict testsin (aka Y) from X?
nlmod - nls(Y ~ A+B*sin(C* X), data=mydata, start=list(A=2, B=4, C=1),
trace=TRUE)
50.42965 : 2 4 1
0.007393982 : 1.9989006 5.0014997 0.902
0.007377637 : 1.9989005 5.0015002 0.922
0.007377637 : 1.9989005 5.0015002 0.922
On 14/02/2012 10:10 AM, Johannes Radinger wrote:
Hi,
Original-Nachricht
Datum: Tue, 14 Feb 2012 09:59:39 -0500
Von: R. Michael Weylandtmichael.weyla...@gmail.com
An: Johannes Radingerjradin...@gmx.at
CC: R-help@r-project.org
Betreff: Re: [R] Wildcard for indexing?
Original-Nachricht
Datum: Tue, 14 Feb 2012 10:18:33 -0500
Von: Sarah Goslee sarah.gos...@gmail.com
An: Johannes Radinger jradin...@gmx.at
CC: R-help@r-project.org
Betreff: Re: [R] Wildcard for indexing?
Hi,
You should probably do a bit of reading about regular
On 13-02-2012, at 23:54, Jonas Stein wrote:
I want to fit discrete data that was measured on a wavegenerator.
In this minimal example i generate some artificial data:
testsin - 2+ 5 * sin(1:100) #generate sin data
testsin - testsin+ rnorm(length(testsin), sd = 0.01) #add noise
mydata -
Note that, given C, A and B can be obtained by simple linear regression of y on
sin(Cx). Hence you could avoid nls altogether by a simple search of the minimal
ls solution(possibly robust) over a grid of C values. Or do this to find good
starting values for nls.
Bert
Sent from my iPhone --
Thank you very much for your help, David!
Now I have got an object which I can work with.
You mentioned that I took two steps to create the new column names.
I had tried doing it in one step but couldn't find out how. Could you help
me with that, as well?
Thank you very much!
Marion
It is possible to do what you ask using - instead of -, but from the
perspective of using the function it will be much clearer if you add mz as an
argument to the function along with Var, and return mz_int at the end. (The
easiest way to return a variable is to type it alone on the last line if
Hello Jim,
Thank you. This will really help me to get the result I need. But I
am having an error message when I run the code although testtype is set to
2 in the calling function to run the Dunnet test. What am I doing wrong?
pt-parametric.tests(testtype=2, resp, groups,
Hi Michael,
Try the attached. The only change to your script is in the first line
where I explicitly tell hatvalues to use methods (the infmlm class
stays). I also commented out all your TESTME at the end.
source('mlminfl-testHELP.R')
Now this should have worked for you too. Let me know. Sorry
Apologies for the empty email earlier!
I have species abundance data sampled at a weekly frequency or
sometimes monthly depending on the year.
The goal is to identify the dates in an annual cycle in which the
cumulative abundance of a species reaches some threshold.
Here's an example of the data
Yes the lapply function sorted it out. Thanks for the advice.
--
View this message in context:
http://r.789695.n4.nabble.com/Selecting-elements-from-all-items-in-a-list-tp4387045p4387505.html
Sent from the R help mailing list archive at Nabble.com.
The short answer to your question is *don't* concatenate the values in the
row, then attempt to /rbind()/ them incrementally to a data.frame. Instead
build each column separately inside the loop, then /cbind() (data.frame()/
does an implicit/ cbind()/ ) them together at the end. Something like
Please report bugs in packages to the corresponding package maintainer
(perhaps suggesting a fix if you have an idea how to do that).
Uwe Ligges
On 14.02.2012 12:42, Martin Batholdy wrote:
Hi,
according to ?rvm the relevance vector machine function as implemented in the
kernlab-package
has
On Tue, Feb 14, 2012 at 6:41 AM, Schmidt, Michael
mschm...@med.miami.edu wrote:
So the function must come BEFORE the call to the function...I see.
Yes. May be different than what you're used to but in R think of
functions as just another set of objects. Therefore they must be
declared in the
Dear all,
In a plot command like
xyplot(Y~X|ID*PERIOD,data=...)
xyplot will generate all the possible ID*PERIOD combinations. But not all
of them have data in there. So I have a lot of empty plots. How can I
suppress those empty plots and ask xyplot only to generate plots actually
with data.
My IT people have set up a Kubuntu box with an RWkard front
end. I have OpenBLAS set up as a shared BLAS but I'm not
sure how to get R to see it. A.3.1 of the installation docs talks
about it but I'm not clear if I need a option on my startup line or
if I need to find a config file. The BLAS is
Is it necessary to match the Excel results? If not, you could just use
approx or approxfun to do a linear interpolation of the cumulative sums at
each of the three points. It would be simpler, faster, and easier to
understand. Taking mean(.15-datayear$cumsum) is giving you the mean of all
the
Set up a single (factor) variable that identifies the combinations that exist,
and plot using that variable.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.us
On 14/02/2012 17:01, Scott Raynaud wrote:
My IT people have set up a Kubuntu box with an RWkard front
end. I have OpenBLAS set up as a shared BLAS but I'm not
sure how to get R to see it. A.3.1 of the installation docs talks
about it but I'm not clear if I need a option on my startup line or
On 14 February 2012 at 09:01, Scott Raynaud wrote:
| My IT people have set up a Kubuntu box with an RWkard front
| end. I have OpenBLAS set up as a shared BLAS but I'm not
| sure how to get R to see it. A.3.1 of the installation docs talks
| about it but I'm not clear if I need a option on my
On Feb 14, 2012, at 10:59 AM, Marion Wenty wrote:
Thank you very much for your help, David!
Now I have got an object which I can work with.
You mentioned that I took two steps to create the new column names.
I had tried doing it in one step but couldn't find out how. Could
you help me with
A) You should (re)read the posting guidelines, and pay particular attention to
supplying reproducible examples. (Not your whole script.. just a cut down
version that others can run that exhibits the problem.)
B) Perhaps you should reconsider the task you have set yourself. You seem to be
On 2/14/2012 6:51 AM, Rainer M Krug wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 14/02/12 13:41, ATANU wrote:
I am using R 2.14.1. I am trying to configure Lyx with Sweave. I
have read articles but I found none to be complete and I cannot
import sweave document in lyx . Can anyone
The only (yes, only) documentation you should look at now is the
official manual of Sweave in LyX, which you can find under the
examples directory of your LyX installation for LyX 2.0.2; it will
appear under the Help menu after LyX 2.0.3 (not released yet, but will
be soon). If you are still
I just looked at Jeff's tutorials; they are great! I no longer see
instructions on noweb or Sweave.sty, so I highly recommend them as
well. I will add links in the official manual. Thanks, Jeff!
Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department
Inline
On Tue, Feb 14, 2012 at 3:16 AM, Nerak T nera...@hotmail.com wrote:
Dear Ilai,
Thanks for your answer. I'm indeed kind of a beginner in R, starting
to discover the endless possibilities in R. My goal for the moment is indeed
to get rid of the use of loops and to see through the
Thanks, Jeff,
It did work in one way if I use
xyplot(Y~X|as.factor(ID*PERIOD),data=...)
But I would like to do something like
xyplot(Y~X|as.factor(paste(ID=,ID)*paste(PERIOD=,PERIOD)),data=...)
Then, it didn't work
The error message:
Error in paste(ID=, ID) * paste(PERIOD=, PERIOD) :
Dear R users,
I am trying to sum number that exist in another vector up to i, then
increment i and repeat.
Sorry. It's hard to explain but basically I am trying to do the following:
test - c(1,2,3,4);
test2 - c(3,5,6,7,2,8,8,4,4);
test3 - c(10,20,30,40);
tmp - 0;
for (i in 1:length(test)){
tmp[i]
I have some data set which has latitude, longitude and Z values.
I would like to plot them on global map.
I am thinking to use image
image(x, y, z, zlim, xlim, ylim, col = heat.colors(12),
add = FALSE, xaxs = i, yaxs = i, xlab, ylab,
breaks, oldstyle = FALSE, useRaster = FALSE, ...)
Hi it works fine
thanks
--
View this message in context:
http://r.789695.n4.nabble.com/save-output-of-loop-tp4386599p4387806.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
The dimensions of variables are unknown , they changes to every file.
--
View this message in context:
http://r.789695.n4.nabble.com/save-output-of-loop-tp4386599p4387804.html
Sent from the R help mailing list archive at Nabble.com.
__
What do you think
A * B
means? Why? Have you read R's Introduction manual?
-- Bert
On Tue, Feb 14, 2012 at 9:50 AM, Jun Shen jun.shen...@gmail.com wrote:
Thanks, Jeff,
It did work in one way if I use
xyplot(Y~X|as.factor(ID*PERIOD),data=...)
But I would like to do something like
read ?xyplot
It takes a skip argument:
‘skip’: logical vector (default ‘FALSE’), replicated to be as
long as the number of panels (spanning all pages). For
elements that are ‘TRUE’, the corresponding panel
position is skipped; i.e., nothing is
Dear R-list members,
I would like to pose a question about the use of the glm() function for
logistic regression when response is proportion range 0.0-1.0.
When logistic regression in glm (y proportion response) is used as:
disease.logr - glm(y ~ x, weights = ntrial, family=binomial, ...)
My
galemago wrote
Dear Forum,
I just recently started to work with R, I´d like to know if there is a way
to give instructions/do operations related to values with different
subscripts within a vector.
Let´s assume I have a vector like this:
A=368369370371 393394395
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of baccts
Sent: Tuesday, February 14, 2012 9:04 AM
To: r-help@r-project.org
Subject: [R] sequential sum
Dear R users,
I am trying to sum number that exist in another vector up
Dear R Community-
I am a new user of R. I am using R with GRASS GIS.
I would apply svm on raster data in GRASS.
Basically I have a raster with areas training and other three raster (each
represents a band of ASTER satellite image).
My goal is to classify, according to training areas, the 3
Hi all,
I'm trying to get the min and max of a sequence of number using a loop
like the folllowing. Can anyone point me to why it doesn't work.
Thanks.
type- c(min,max)
n - 1:10
for (a in 1:2){
print(type[a](n)) }
--
Muhammad
__
On Tue, 14-Feb-2012 at 04:30AM -0800, Sana wrote:
| I have a data set that looks like this:
| ID STRATA G_F_Bl Dkl N g_pr_dklN_haG_ha
| 20,103 2 1 5 5 0,002 250 0,5
| 20,103 2 1 7 3 0,0038 150 0,57
|
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Muhammad Rahiz
Sent: Tuesday, February 14, 2012 11:03 AM
To: x.r-help
Subject: [R] execute array of functions
Hi all,
I'm trying to get the min and max of a sequence of
On Feb 14, 2012, at 1:38 PM, Nordlund, Dan (DSHS/RDA) wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of baccts
Sent: Tuesday, February 14, 2012 9:04 AM
To: r-help@r-project.org
Subject: [R] sequential sum
Dear R users,
I
That won't work because R has special rules for evaluating things in the
function position. Examples:
*OK*
min(1:2)
min(1:2)
f-min; f(1:2)
do.call(min,list(1:2))
do.call(min,list(1:2)) # do.call converts string-function
*Not OK*
(min)(1:2) # string in function position is
On Feb 14, 2012, at 2:23 PM, Nordlund, Dan (DSHS/RDA) wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Muhammad Rahiz
Sent: Tuesday, February 14, 2012 11:03 AM
To: x.r-help
Subject: [R] execute array of functions
Hi all,
Hello R-List,
I have a question about recoding from a date time object. I have tried using
as.POSIXct objects and Chron Objects, but I can get the what I want.
I need to create a new variable from a date-time object, adding Office Time
for those events that happens between 08:00:00 to
On Feb 14, 2012, at 2:32 PM, Stavros Macrakis wrote:
That won't work because R has special rules for evaluating things in
the
function position. Examples:
*OK*
min(1:2)
min(1:2)
f-min; f(1:2)
do.call(min,list(1:2))
do.call(min,list(1:2)) # do.call converts string-function
*Not OK*
On 14/02/2012 2:23 PM, Nordlund, Dan (DSHS/RDA) wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Muhammad Rahiz
Sent: Tuesday, February 14, 2012 11:03 AM
To: x.r-help
Subject: [R] execute array of functions
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Nordlund, Dan (DSHS/RDA)
Sent: Tuesday, February 14, 2012 11:24 AM
To: r-help@r-project.org
Subject: Re: [R] execute array of functions
-Original Message-
From:
Not sure the replies you received make it clear, but the key point is
that functions are first class objects in R like any other objects
(vectors, lists, data frames) and can be assigned, collected into
structures, indexed, etc. in the usual way. Further, if the value of
any R expression is a
Hi there,
I am trying to compute the autocorrelation in a dataset using R's acf
function. ACF automatically plots the results. This works well except in
some cases xlim doesnt work
data - rnorm(2000,0,1)
acf(data,xlim=c(1,10)) # works - the plot starts at 1
acf(data,lag=100,xlim=c(1,100)) #
I don't know of any package that will do it (or if violating the
marginality principle by having non-nested models even makes sense)
but you could always build your own search through all possible
models. Problem is for a large number of fixed effects this can take a
good bit of time...
Here is a
Hello all:
I'm trying to use the following code to get commands, comments and results to a
.txt file. It only appears to capture comments. When I comment those out with
#, it creates a NULL file.
Someone seemed to have a similar problem with a mac GUI
Assuming this is the hexplom function from the hexbin package (it is
best to be specific in case there are multiple versions of the
function you ask about), you can specify lower.panel=function(...){}
for a, and as.matrix=TRUE for c, for b I am not sure what exactly
you want to do, but look at the
dput(sensor.sample)
structure(c(1328565718.65, 1328566608.9, 1328566162.65, 1328566571.1,
1328566598.85, 1328565634.3, 1328566513.95, 1328565123.65, 1328565827.1,
1328566719.9, 1328565527.55, 1328565118.05, 1328565556.85, 1328565623.85,
1328565230.75, 1328566083.85, 1328566012.45, 1328566795.75,
I'm reading a file and using the file to populate a data frame. The way the
file is laid out, I need to fill in the data frame one row at a time.
When I start reading my file, I don't know how many rows I will need. It's
on the order of a million.
Being mindful of the time expense of
On 12-02-14 3:13 PM, Diviya Smith wrote:
Hi there,
I am trying to compute the autocorrelation in a dataset using R's acf
function. ACF automatically plots the results. This works well except in
some cases xlim doesnt work
data- rnorm(2000,0,1)
acf(data,xlim=c(1,10)) # works - the plot starts
Dan,
Thank you very much. That is exactly what I need. What a clever solution.
David, thanks for trying.
Thank you all. I would never be able to figure it out on my own.
Lin
From: dwinsem...@comcast.net
To: nord...@dshs.wa.gov
Date: Tue, 14 Feb 2012 14:28:21 -0500
CC:
All,
I frequently make spreadsheets in Excel in which I rank values in columns
by stop-light colors (red is bad, yellow is OK, green is good).
Image and heatmap expect a matrix in which all the data are in the same
scale, but I frequently have different scales in different columns. ie.
Column
If you must repeatedly append rows to a data.frame,
try making the dataset you are filling in a bunch
of independent vectors, perhaps in a new environment
to keep things organized, and expand each at the same time.
At the very end make a data.frame out of those vectors.
E.g., change the likes of
Hi, John-
Would it be possible to scale the values in each column to fall between 0 and 1
(or standardize them) and use a single color ramp?
Ken
On 02/14/12, John Nicholas wrote:
All,
I frequently make spreadsheets in Excel in which I rank values in columns
by stop-light colors (red is
1 - 100 of 122 matches
Mail list logo