It looks like what you are doing is reasonably efficient: I do think
there's a residuals element to the object returned by lm() so you
could just call that directly (which will be just a little more
efficient).
The bulk of the time is probably being taken up in the lm() call,
which has alot of
? window
Michael
On Thu, Feb 23, 2012 at 7:09 AM, phillen phlent...@gmail.com wrote:
hi there!
i am desperately in need for help.
i have read in data:
qthm=read.csv(qthm.csv,sep=;,header=TRUE)
then created time series ie
m2=ts(log(qthm$m2), start=c(1959, 1), frequency=4)
transformed
eval(parse(text = rcom))
Michael
On Thu, Feb 23, 2012 at 8:30 AM, Aniruddha Mukherjee
aniruddha.mukher...@tcs.com wrote:
I have an object called rcom which was created by the command rcom
-mean(mat_rix$COL_1). Also the data-frame mat_rix is well defined with
numeric values in its column 1 and
df[value %in% v, ]
Michael
On Thu, Feb 23, 2012 at 10:48 AM, syrvn ment...@gmx.net wrote:
Hello,
consider the following data.frame df and vector v
df - data.frame(group = c(A,B,C,D), value = c(1,2,3,4))
v - c(2,3)
How can I return a sub data.frame which has only the rows left where
If you could just construct the zoo object you want to plot and then
use dput() on it to create a plain-text representation (safe for
emailing) that'd make it easiest for us to help you. We can't do much
right now since we don't have the text file in question.
Michael
On Thu, Feb 23, 2012 at
shell you're using).
Michael
On Thu, Feb 23, 2012 at 1:47 PM, Erin Hodgess erinm.hodg...@gmail.com wrote:
Sorry...Debian
On Thu, Feb 23, 2012 at 11:51 AM, R. Michael Weylandt
michael.weyla...@gmail.com michael.weyla...@gmail.com wrote:
What OS?
Michael
On Feb 23, 2012, at 12:44 PM, Erin
sapply(1:NCOL(x), function(n) cor(x[n], y[n])) is a quick and dirty
way, though probably not optimal.
Michael
On Thu, Feb 23, 2012 at 5:10 PM, Sam Steingold s...@gnu.org wrote:
suppose I have two sets of vectors: x1,x2,...,xN and y1,y2,...,yN.
I want N correlations: cor(x1,y1), cor(x2,y2),
You have three problems:
1) You don't post with context
2) You have a (likely OS permissions) issue that keeps you from
accessing the RData file
3) You can't put a whole bunch of data in a single element of an
object (ie., you are trying to put a column of data in a single
element of an object:
I'm not sure if you mean to ignore row 6 while ignoring row 4 or not
so here are two solutions (depending on what you meant)
dput(x) # dput is your friend
structure(list(kind = c(1L, 1L, 1L, 1L, 2L, 2L), x = c(8L, 44L,
25L, 36L, 2L, 36L), y = c(9L, 3L, 7L, 20L, 14L, 20L)), .Names = c(kind,
x, y),
rm(list = ls(pattern = object))
Michael
On Fri, Feb 24, 2012 at 4:40 PM, katarv katiasm...@gmail.com wrote:
Hi,
I'm trying to figure out syntax R function rm() needs to remove all objects
starting with same name. For example, if I have object1, object2, object3,
i want to do an operation
This sure sounds like you need to read the advice I gave you on the
other thread where you asked the same questions...
Michael
On Fri, Feb 24, 2012 at 5:04 PM, uday uday_143...@hotmail.com wrote:
The following error I got
Warning messages:
1: In sci.lat[i] = data[, 7] :
number of items to
Your question is not well formed: do you want a list or a string
(totally different things)? Or even more likely, a character vector?
What do you have now: is it really an array (=matrix) or is it the
data.frame it looks like?
If it's a matrix:
x - matrix(letters[1:8], ncol = 2)
x - as.vector(x)
My apologies: I missed the order of the desired output: the easiest
thing to do is likely to use the same techniques given below (and by
others in this thread) with a transpose t() before.
Michael
On Sat, Feb 25, 2012 at 2:05 AM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Your
, legend = PARAMETERS[,
label], lwd = 1, col = PARAMETERS[, color])
grid()
Hope this helps,
Michael
On Sat, Feb 25, 2012 at 2:22 AM, R. Michael Weylandt
michael.weyla...@gmail.com michael.weyla...@gmail.com wrote:
Easiest thing to do: use the optional ylim argument to plot (taking values
like c
Look at ?optim and example(optim)
Michael
On Sat, Feb 25, 2012 at 11:47 AM, Jaymin Shah jayminsh...@hotmail.com wrote:
I was wondering how to make a function which minimises a vector (a,b,c,d).
I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to
make this equation
I had never actually played with matplot before -- thanks for the great tip.
Michael
On Sat, Feb 25, 2012 at 7:39 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
See inline below.
On 2012-02-25 12:40, R. Michael Weylandt wrote:
I might (re-)format your code as follows -- others will make some
Your code isn't reproducible...(note the legend block -- that's
not code) and (if I had to guess) it looks like you are using
attach(). Don't do that...
What do you mean it doesn't work? You say something about plotting
lines, but your working code (the first block) doesn't do that...
If
Short answer to a very good question: one has to use function(x)
tail(x, 1) syntax to avoid using the default tail(x, 6). There are
some other ways to achieve the same thing, but I think this syntax is
generally preferred for its clarity.
Other question: yes I believe so.
Michael
On Sun, Feb
This is a mess -- please resend in plain text.
Also, there are not, to my knowledge, packages (not libraries) called
A, B, or C so your script doesn't even begin to look
reproducible were it legible.
Do you have read/write access to the directories in question?
Michael
On Sat, Feb 25, 2012 at
Old sources are available here:
http://cran.r-project.org/src/contrib/Archive/HH/
You'll have to see which ones are compatible
Michael
On Mon, Feb 27, 2012 at 1:02 AM, Vijayan Padmanabhan
v.padmanab...@itc.in wrote:
Dear R Group
Can any body point me to a link from where I can get zip archive
without proof can be denied without proof - Euclide.
*R. Michael Weylandt michael.weyla...@gmail.com*
02/27/2012 11:38 AM
To
Vijayan Padmanabhan v.padmanab...@itc.in
cc
r-help@r-project.org
Subject
Re: [R] win zip archive of library(HH) for R2.12.0
Old sources are available here
I believe read.csv(..., na.strings = ) will do it.
Michael
On Mon, Feb 27, 2012 at 8:15 AM, nikhil abhyankar nsabhyan...@gmail.com wrote:
Hello,
I have a CSV file with region codes listed in a column. E.g. 'AS' for Asia,
'AU' for Australia and 'NA' North America.
However, the data frame
Hadley's lubridate package might be of some help to you.
Michael
On Mon, Feb 27, 2012 at 11:40 AM, ikuzar raz...@hotmail.fr wrote:
So, how is the correct way to increment the day ?
--
View this message in context:
Do you perhaps need to add install.packages(..., type=src)? Just a
(untested) guess...
Michael
On Mon, Feb 27, 2012 at 12:07 PM, DT54321 deepan.tailo...@gmail.com wrote:
Hi,
I am having real problems downloading the package 'QRMlib'. The tar.gz file
is shown here:
You can save it directly as an R object with save() and load with
load() -- that's probably easiest. It should be portable between R
platforms and sesions, but won't be easily accessible to other
programs.
Michael
On Mon, Feb 27, 2012 at 3:45 PM, frauke fh...@andrew.cmu.edu wrote:
Hey,
I have
But it won't be hard at allyou can likely get what you need using
the tapply() function (or ave)
Michael
On Tue, Feb 28, 2012 at 4:33 AM, ikuzar raz...@hotmail.fr wrote:
Hi,
Ok, I understand what you mean.
I wanted to get sorted data group by cluster in output ...
But I have to do it
You need to reassign the value of append back to h -- in more
technical terms, this is a pass-by-value rather than pass-by-reference
behavior:
h - append(h, 9)
This is not likely to be efficient in production code, however.
Michael
On Tue, Feb 28, 2012 at 7:15 AM, sagarnikam123
Use this line instead:
table - read.table(fileIchoose - file.choose(), skip = 1)
This will have the side effect of creating fileIchoose as a variable
containing a file path.
Michael
On Tue, Feb 28, 2012 at 8:34 AM, sagarnikam123 sagarnikam...@gmail.com wrote:
i open a table
What is initialCuratedDF? I'm not seeing it in any standard location
so there's no way to debug it...
Also see inline.
Michael
On Tue, Feb 28, 2012 at 2:41 PM, Ben Ganzfried ben.ganzfr...@gmail.com wrote:
Hey,
I just googled my error and many things came up. I followed the leads and
read
It would seem that hier.part is not in the gtools packagedo you
have some reference that suggests otherwise? I don't know the
function, but I might suggest you check the hier.part package (also on
CRAN).
Michael
On Tue, Feb 28, 2012 at 4:27 PM, haiyan tucsonaug...@gmail.com wrote:
Error:
Please quote context.
You can open it with any plain text editor. (i.e., notepad)
Michael
On Tue, Feb 28, 2012 at 2:42 PM, DT54321 deepan.tailo...@gmail.com wrote:
Yes, I did. But my Windows did not know what program to open it with...
--
View this message in context:
You can save it as an R Data file using save() and then reload it with
load() -- there's not a natural way to make it something that lives
nicely in a text file (since an nls object is quite complex) -- if you
are just going to be using the object again in R I'd recommend the
first. If you need it
In short, don't -- use a named list instead.
Long answer:
?assign
?get
Michael
On Tue, Feb 28, 2012 at 10:40 PM, michaelyb cel81009...@gmail.com wrote:
Hello,
I am trying to use a for loop to name objects in each iteraction. As in the
following example (which doesn't work quite well)
I don't use Access but my general impression is that the advantages it
brings will be similar to those brought by any other database:
performance rather than ability -- they are both Turing complete after
all, after some trickery on the SQL end.
Databases allow much larger data sets than R
Factors are internally stored as integers (enums if you have used
other programming languages) with a special label set -- it's more
memory efficient than storing the whole string over and over.
Michael
On Wed, Feb 29, 2012 at 5:49 AM, Aniruddha Mukherjee
aniruddha.mukher...@tcs.com wrote:
Change the name to something syntactically valid? The problem is that
you can't (well, you can, but it's ill advised) have variable names
beginning with numbers. They don't seem to be used much so there
won't be much trouble in that.
Michael
2012/2/29 Freddy Hernández fhern...@gmail.com:
I
The error message is clear: your problem is that your data.frame (note
the period) contains factors. Use str(data) -- also don't use data as
it's a function name -- to see which ones and change as appropriate.
Michael
On Wed, Feb 29, 2012 at 7:16 AM, arunkumar akpbond...@gmail.com wrote:
Hi
Oh...that does make more sense -- seemed like a rather odd choice of
variable name.
Michael
On Wed, Feb 29, 2012 at 8:40 AM, Prof Brian Ripley
rip...@stats.ox.ac.uk wrote:
On 29/02/2012 13:24, R. Michael Weylandt wrote:
Change the name to something syntactically valid? The problem
Formally, look at Pr(|z|). Informally, look at the null and residual
deviances from print(aa).
Michael
On Wed, Feb 29, 2012 at 10:14 AM, Michael comtech@gmail.com wrote:
How did you see it's non-significant?
Thanks!
On Wed, Feb 29, 2012 at 9:10 AM, Sarah Goslee
Your method of constructing a formula is funny: is there a term called
interaction or do you mean an interaction in the statistical sense?
Once you do that, I'd think the easiest way to proceed is to use
as.formula() to construct your formula programmatically and then to
pass that to glm().
Simply type ur.ers on a line by itself to see how the calculation is
implemented.
Michael
On Wed, Feb 29, 2012 at 11:20 AM, ackbar03 wda...@gmail.com wrote:
I need some real help on this, really stuck
how are the coefficients for
ur.ers(y, type = c(DF-GLS, P-test), model = c(constant,
Perhaps you need the forecast() function?
Michael
On Wed, Feb 29, 2012 at 12:01 PM, ForzaBruta s207027...@live.nmmu.ac.za wrote:
hi all. i'm busy with some time series data, starting from an earlier period
until the current day.
i have created a time series forecast taking into account the
Perhaps something like
sink(outtext.txt)
lapply(LIST, print)
sink()
You could replace print with cat and friends if you wanted more
detailed control over the look of the output.
Michael
On Thu, Mar 1, 2012 at 5:28 AM, t.galesl...@ebh.umcn.nl wrote:
Dear R users,
Is it possible to write the
It might be a local network or OS issue: this works fine for me on my
personal Mac
download.file(url = http://ir.eia.gov/wpsr/psw09.xls;, destfile =
~/herewego.xls, mode = wb)
Someone with more Windows knowledge may have to help you out, but
often using IE settings (activated by the setInternet2
Of course, just use
x - fun(Temp, v)
x$Temp # To get back temp
x[[Temp]]
x$v # To get back v
x[[v]]
Michael
On Thu, Mar 1, 2012 at 3:15 PM, babyluck madr...@gmx.ch wrote:
Thank you Rui, that helped a lot. The correct values show up when I'm using
the following code. Now fun(Temp,v)
Inelegant, but here's one way:
d1 - Sys.Date()
d2 - Sys.Date() + 100
library(lubridate)
d - seq(d1, d2, by = day)
d[wday(d)==6]
Michael
On Thu, Mar 1, 2012 at 3:02 PM, Ben quant ccqu...@gmail.com wrote:
Hello,
How do I get the dates of all Fridays between two dates?
thanks,
Ben
It is by no means clear what the peaks function does or if it has
any R equivalent, but perhaps looking at demo(rgl) will get you
started. After that, you should probably show what you've tried (at
least as far as replicating the calculation aspects).
Michael
On Fri, Mar 2, 2012 at 1:32 AM,
Can you post dput(head(eqn, 30)) so we can take a look at your data?
It's something of a cryptic error and that would go a long way in
helping us help you.
Without that though, I'm not sure you need the I(as.matrix.(dep)) and
I(as.matrix(ind)), I would imagine (untested) that eqn -
It'd be doubly helpful if you could post desired output as well.
If you haven't seen it before, the easiest way to post R data is to
use the dput() function to get a plain-text (mailing list friendly)
representation. If your data is large, dput(head(DATA, 30)) should
suffice.
(We wouldn't want
Untested, but it might be simpler than that:
suspicious.vowels(pb,c(Type,Sex,Vowel),F1,F2)
Note that F1 is in quotes but F2 isn't.
Michael
On Sat, Mar 3, 2012 at 5:46 PM, Fredrik Karlsson dargo...@gmail.com wrote:
Dear list,
Sorry, but I cannot get my head around how and I could pass
That code doesn't seem to run (much to a little bit of surprise) as
is: try this:
d - structure(list(REMOVED = c(0.07, 0.1, 0.11, 0.12, 0.15, 0.19,
0.28, 0.31, 0.3, 0.34, 0.35, 0.39, 0.38, 0.4, 0.42, 0.4, 0.41,
0.42, 0.48, 0.48, 0.47, 0.49, 0.5, 0.51, 0.53, 0.58, 0.59, 0.65,
0.6, 0.6, 0.69, 0.7,
No. Do not do that. While it looks nice at first, it quickly becomes
the source of innumerable errors.
Michael
On Sun, Mar 4, 2012 at 1:56 AM, Kazuo Ishii freepar...@gmail.com wrote:
2012/3/4, westland westl...@uic.edu:
I am still/again having trouble getting PLSR to recognize the input data
concerning how I might fiddle the files to
get them into a format that PLSR package would like, that would be great
Chris Westland
On Sat, Mar 3, 2012 at 8:17 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
Can you post dput(head(eqn, 30)) so we can take a look at your data?
It's
It's an internal function so you have to look into the C sources: it's
here under do_sample, but you'll have to follow all sorts of other
functions down the rabbit hole if you want to understand the whole
thing.
http://svn.r-project.org/R/trunk/src/main/random.c
Michael
On Mon, Mar 5, 2012 at
No, it won't give the same result. If you load packages or have hidden
variables / environments, they'll remain in the session or if you
change global options they'll stay. It's a somewhat frequently asked
question, but there's no way to get a factory fresh session without
restarting R. You can
What are surfA, surfB? There's nothing to suggest that difcount is
vectorized so if they are vectors of length 1 that could lead to
your problem.
Michael
On Mon, Mar 5, 2012 at 2:07 PM, Colin Wren colindw...@gmail.com wrote:
Hi,
I'm trying to calculate a sum of differences between two ascii
Those are error messages from the shell, not real values for what
you think you are doing. Are you looking for the getwd() and
Sys.date() functions instead?
Michael
On Tue, Mar 6, 2012 at 6:56 AM, sagarnikam123 sagarnikam...@gmail.com wrote:
i run like ,but it giving other than what i expect
i
library(reshape2)
melt(df, id.vars = c(ID1, ID2, ID3))[, -4]
# To drop an extraneous column (but you should take a look and see
what it is for future reference)
Michael
On Tue, Mar 6, 2012 at 6:17 AM, mails mails00...@gmail.com wrote:
Hello,
I am trying to reshape a data.frame in wide
eval(parse(text = STRING))
but you often don't need to do this. A somewhat canonical quote in the R-world:
If the answer is parse() you should usually rethink the question.
-- Thomas Lumley, R-help (February 2005)
Michael
On Tue, Mar 6, 2012 at 10:06 AM, Lucas lpchaparro...@gmail.com wrote:
Type at your console:
library(lattice)
example(xyplot.zoo)
I think the second and third do what you were asking. Otherwise,
please describe in more detail what you mean about add other
variables to each panel -- how do you want these displayed and what
sort of variables are they?
On Tue, Mar 6,
You'll need to use the cast() function but I can't say more unless you
can provide more specifics. I believe Hadley's website has more
documentation than the package: http://had.co.nz/reshape/
Michael
On Tue, Mar 6, 2012 at 9:34 AM, mails mails00...@gmail.com wrote:
Hey Michael,
thanks for
Or perhaps faster but less general:
rowSums(mydata != 0)
Michael
On Tue, Mar 6, 2012 at 12:56 PM, Sarah Goslee sarah.gos...@gmail.com wrote:
A reproducible example would be helpful, but lacking that
here's some untested code. If your data frame has NA values,
those will also need to be dealt
Perhaps you should dput() you data so this is reproducible...
Michael
On Wed, Mar 7, 2012 at 10:15 AM, RMSOPS ricardosousa2...@clix.pt wrote:
Good Afternoon,
I have a small problem with the following code.
# The x.sub$Time[[1]] 2006-10-31 19:03:01 EST
# when put in variable star
Load doesn't return the object you saved, but rather a character
vector with the name of that object, here x. So you would do
something like
load(/path/to/file_A)
x # Here's your data
or more robustly
get(load(/path/to/file_A))
See ?load (value) for details.
Michael
On Thu, Mar 8, 2012 at
This question seems more suited to the Bioconductor mailing list:
you'll get specialized (and very good) help if you post there.
Michael
On Thu, Mar 8, 2012 at 6:22 AM, Ekta Jain ekta_j...@jubilantbiosys.com wrote:
Dear All,
I have an exon array and did not find any differential gene
dput(x.sub) so we can see what you really have.
Michael
On Thu, Mar 8, 2012 at 4:35 AM, RMSOPS ricardosousa2...@clix.pt wrote:
Hello
In the variable x.sub$Time i have the many dates in format 2006-10-31
20:10:35 EST, for example when
print (x.sub$Time) give this
[1] 2006-10-31
One way is to do it manually
plot(..., xaxt = n)
axis(1, at = seq_along(wnd), labels = paste(seq_along(wnd), h)
The other is to give plot x and y vectors.
Michael
On Wed, Mar 7, 2012 at 10:25 PM, Jie Tang totang...@gmail.com wrote:
hi
I plot a series of observation data every minutes in a
Please use dput() to give a reproducible example: I can make this work
on a data frame quite easily --
x - data.frame(1:10, letters[1:10], rnorm(10))
str(x)
print(x)
x[sample(nrow(x), 5), ]
So it's not a problem with something being a data frame or having factors.
Michael
On Thu, Mar 8, 2012
Perhaps which(x == y) or intersect(x,y) or x %in% y or many others.
You really need to give an example of x and y and say what you mean by
identical pairs to get any concrete suggestions.
Michael
On Thu, Mar 8, 2012 at 11:17 AM, Alaios ala...@yahoo.com wrote:
Dear all I am having two numerical
rle should get you started.
Michael
On Thu, Mar 8, 2012 at 9:35 AM, Jorge Molinos jgarc...@tcd.ie wrote:
Hi all,
I have a nx1 logical array of zeros and ones and I want to calculate the
individual lengths of all 1-consecutive sequences contained in it. Is there
an easy quick way to do
What goes wrong? Your code isn't reproducible and you didn't give an
error message. I'd mention that d - Null does not assign NULL to d
which might lead to a dimension mismatch at some point. Also,
something about your loop syntax seems funny: you are looping over
rows but selecting columns of
On Thu, Mar 8, 2012 at 1:08 PM, Gabriel Yospin yosp...@gmail.com wrote:
Hello R Help!
Hello Gabe Yospin! (I feel like I should start playing some arena rock
anthem now ;-) )
I would like to make a legible boxplot of tree growth rates for each of
seven tree species at each of seven different
Well, it would be possible to set something up to select out just the
right pairs each time, but on my system the following
a - matrix(rnorm(40 * 732), 40)
b - matrix(rnorm(40 * 1230), 40)
system.time(cor(a,b,method = pearson))
takes about a tenth of a second so any more elective approach will
(theme_bw())
ggplot(datnew.lo, aes(x = sp, y = ga)) + geom_boxplot() +
facet_wrap(~site, ncol = 7) +
opts(axis.text.x=theme_text(angle=90, size = 8, hjust = 1)) +
xlab(Species) +
ylab(expression(paste('Basal Area Growth Increment (mm '^{2},')')))
On Thu, Mar 8, 2012 at 12:22 PM, R. Michael
Yes, please upload some code / data (minimal working example). The
easiest way to upload data is to use dput() for a plain text
representation. Also remember that the majority of R-Helpers don't use
Nabble (rather they use an email client directly) so it's easier for
us if you put things in the
library(stringr)
x$Name - str_trim(gsub([ABC] Branch, ,x$Name))
Michael
On Fri, Mar 9, 2012 at 12:32 AM, Sichong Chen csc...@gmail.com wrote:
Dear Community
I have a large dataframe x as follows with common ids but different names:
x - data.frame(ID = c(1,1,2,2,2,3,3),
+ Name = c(B Branch
Reproducible code please. (I'm quite surprised this would happen --
are you sure there's no stochastic element to your calculation that
explains the differences?)
But the canonical answer is the CLI R and the CRAN binaries.
Michael
On Fri, Mar 9, 2012 at 7:11 AM, Aayush Raman
Missed that...thank you.
Michael
On Fri, Mar 9, 2012 at 8:21 AM, peter dalgaard pda...@gmail.com wrote:
On Mar 9, 2012, at 13:15 , R. Michael Weylandt wrote:
Reproducible code please. (I'm quite surprised this would happen --
are you sure there's no stochastic element to your calculation
? sort
x - c(Sys.Date(), Sys.Date() + 1, Sys.Date() - 1)
print(x)
print(sort(x))
Michael
On Fri, Mar 9, 2012 at 8:35 AM, carol white wht_...@yahoo.com wrote:
Hello,
How is it possible to sort dates in R?
Cheers,
Carol
__
Perhaps ?polygon
Michael
On Fri, Mar 9, 2012 at 6:10 AM, aoife aoife.m.dohe...@gmail.com wrote:
May I ask, is it possible using plotrix to shade a group of variables
differentially from the rest of a graph, eg so the output looks similar to
this, where the nodes of open circles are my nodes
No idea what table1, table2 are
plot(1:5, type = l)
points(5:1, col = 2)
should get you started.
Michael
On Fri, Mar 9, 2012 at 10:17 AM, aaral singh aaral.si...@gmail.com wrote:
Hello.
I have 2 plots.
plot1 -plot(table1)
plot2 -plot(table2)
How may i plot these both on the same
You are overriding b at each loop iteration and consequently only
keeping the last one.
Perhaps
b - list()
for(i in sort(unique(OT1$month))){
a-OT1[OT1$month==i,]
b[[i]]-ppp(a$longitude,a$latitude,marks=a$fTSUM,window=newW)
plot(b[[i]],main=i)
}
Generally it's bad practice
You should probably read up on what the chi-squared test actually
tests: in one form, it asks whether some set of observations could
have come from a given multinomial distribution. Concretely, it asks
whether it is reasonable to get 3 blues, 4 reds, and 2 whites from a
uniform distribution over
overlapping the other? i.e.
to view two sets of data in one 2D space?
Many thanks
On Fri, Mar 9, 2012 at 3:51 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
No idea what table1, table2 are
plot(1:5, type = l)
points(5:1, col = 2)
should get you started.
Michael
It's here (search the sources for the appropriately named qbeta.c) but
I can't guarantee you'll understand it easily: Martin Maechler (and
others) works hard to make these the best in the business, but that
performance comes at a price, here paid in opacity:
That doesn't really seem to make sense to me as a graphical
representation (transforming adjacent y values differently), but if
you really want to do so, here's what I'd do if I understand your goal
(the preprocessing is independent of the graphics engine):
DAT - data.frame(x = runif(1000, 0,
) + facet_wrap( ~ xbin) + geom_step(aes(x =
seq_along(y), y = sort(y)))
and see this for more: http://had.co.nz/ggplot2/geom_step.html
Michael Weylandt
I ran your program but couldn't figure out the meaning of the dots in your
plot?
Thanks again!
On Fri, Mar 9, 2012 at 7:07 PM, R. Michael
thoughts?
Thanks a lot!
On Fri, Mar 9, 2012 at 8:51 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
On Fri, Mar 9, 2012 at 9:28 PM, Michael comtech@gmail.com wrote:
Thanks a lot Mike!
Michael if you don't mind. (Though admittedly it leads to some degree
of confusion
Inline.
On Fri, Mar 9, 2012 at 7:04 PM, RHelpPlease rrum...@trghcsolutions.com wrote:
Hi there,
I am having trouble subsetting a data frame by a conditional via one column
(of many).
I read the file into R through read.fwf, where I specified column widths.
Original data is .DAT. I then
Read ?paste and use something like
paste(GPS_, paste(TimeStamps, collapse = _), sep = )
Michael
On Sat, Mar 10, 2012 at 11:41 AM, Alaios ala...@yahoo.com wrote:
Dear all,
I am using paste to create a file name.
filename- paste(GPS_, TimeStamps, sep=)
where TimeStamps is a character vector,
What does your data look likedput() is your friend.
Also, it'd be helpful if you could give base graphics code for
more-or-less what you are looking for (since you can do so already) as
it's pretty hard to describe graphics without pictures.
Running example(xyplot) might help you get started
? try or ? tryCatch
Michael
On Sat, Mar 10, 2012 at 6:08 PM, Alaios ala...@yahoo.com wrote:
Dear all,
I would like to ask you how I can catch an error on R and then ask it to
resume.
For example I have a large for loop and I know for a small number inside that
loop there will be errors.
Well, it's not hard to write the code for it, but if you know the
secret way to accurately model abnormal returns, you'll be a far
richer man than I quite soon.
Less snidely, one needs to say quite a bit more about a distribution
to specify it than not Gaussian.
Michael
On Sat, Mar 10, 2012 at
Your code for iy doesn't work as providedI'll assume you meant this instead:
iy - list(c(1, 2),c(1, 2), c(1, 2, 3, 4), c(2, 3, 5), c(4), c(5, 6,
7), c(7, 8, 9))
Then
sapply(iy, function(x) sum(Y1[x]))
Michael
On Sat, Mar 10, 2012 at 5:01 PM, aldi a...@dsgmail.wustl.edu wrote:
Hi,
I
,
idx against diff_std3.
I have looked at sample xyplot codes, but still did not know how to realize
this.
Thanks again!
Chee
From: R. Michael Weylandt
Sent: Saturday, March 10, 2012 12:20 PM
To: Chee Chen
Cc: R-ORG
Subject: Re: [R] Help on subgraphs in xyplot of lattice library
Your immediate problem seems to be that you use sum as a variable
name when it is also a function name. You also have scoping issues
that result from how you're using with() -- if you don't return an
object, it gets thrown away after the with() function is done (part of
the functional paradigm) --
In general, I *think* this is a hard problem (it sounds knapsack-ish)
but since you are on small enough data sets, that's probably not so
important: if I understand you right, this little function will help
you.
plusminus - function(n){
t(as.matrix(do.call(expand.grid, rep(list(c(-1,1)),
of
try() to an object.
Check whether that object is of class try-error and if so, do
whatever you want
the failure case to be.
Sarah
B.R
Alex
From: R. Michael Weylandt michael.weyla...@gmail.com
Cc: R help R-help@r-project.org
Sent: Sunday, March 11
It's not always true that going out of bounds in subscripting gives an
error (as you seem to assert in your original post)
x - 1:3
x[4] # No error
and note that mean() has a na.rm argument.
Perhaps you should construct a *reproducible* example of what you
think will go wrong.
Michael
On Mon,
On Mon, Mar 12, 2012 at 11:42 AM, huang jialin huangps...@gmail.com wrote:
Hello,
I have a vector {a, b1, b2, b3, b4}.
What does this mean? Is this a character vector giving names of
objects that exist elsewhere in the workspace? Else, how do you tell
a/b1/b2 apart in a vector?
You probably
301 - 400 of 2207 matches
Mail list logo