On Tue, 2 Mar 2010 15:13:54 -0500 Ralf B ralf.bie...@gmail.com wrote:
1) What are your 3 most useful R package? and
plyr
ggplot2
lattice
--
Karl Ove Hufthammer
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
Thanks for all replies but it is still not what I wanted.
Referring to the previous example that I gave, I want that the objects mat1,
mat2 and mat3 be created as matrix object. I want to access their value without
get() and when I type ls(), I will have
mat1 mat2 mat3
and not only
mat1
After 1 day searching the internet, I solved the problem with the
following code:
Encode(xml) - UTF-8
# now the ü etc. become ü,etc.
gsub(ü,Ä,xml) # employ the gsub()-function WITHOUT
useBytes-option turned on
Encode(xml) - unknwon
# that was the former encoding
So all in all there is a
On Wed, Mar 3, 2010 at 8:26 AM, carol white wht_...@yahoo.com wrote:
Thanks for all replies but it is still not what I wanted.
Referring to the previous example that I gave, I want that the objects mat1,
mat2 and mat3 be created as matrix object. I want to access their value
without get()
On Wed, 3 Mar 2010, Worik R wrote:
I have a zoo object z
z
Value
2003-11-15 2.22
2003-11-17 2.26
2003-11-19 2.28
2003-11-22 2.54
2003-11-26 2.55
I wish to find the entry 2 entries before 2003-11-26. How do I do this?
If you want to find out that this is at the third position
Hello !
Please let me ask how can somebody manipulate de (G)ARCH times series
processus in R. Tank !
--
View this message in context:
http://n4.nabble.com/R-times-series-tp1576119p1576119.html
Sent from the R help mailing list archive at Nabble.com.
(...)
While you're sending your bug report to David, perhaps you can try the
SVM from kernlab.
It relies on code from libsvm, too, but ... you never know. It can't
hurt to try.
Hi Steve,
thanks for that hint.
I tried ksvm()-function bet get an error message:
model - ksvm(soil_unit~.,
On Tue, 2 Mar 2010, Beaudelaire TAFOUEDA wrote:
Hello !
Please let me ask how can somebody manipulate de (G)ARCH times series
processus in R. Tank !
See the GARCH section in:
http://CRAN.R-project.org/view=TimeSeries
hth,
Z
--
View this message in context:
On 03/03/10 09:26, Karl Ove Hufthammer wrote:
On Tue, 2 Mar 2010 15:13:54 -0500 Ralf Bralf.bie...@gmail.com wrote:
1) What are your 3 most useful R package? and
plyr
ggplot2
lattice
Well, as you ask the question, the three most useful R packages are:
base, stats and methods ;-) ...
On Wed, 3 Mar 2010 09:26:32 +0100 Karl Ove Hufthammer k...@huftis.org
wrote:
1) What are your 3 most useful R package? and
plyr
ggplot2
lattice
And since 'lattice' already is in the 'recommended' set, and therefore
included in R by default, I'd like to add one more package:
sos
--
You haven't mentioned an OS nor a graphics device, So I will guess
Windows and windows(), since that is commonest device with a history.
On Wed, 3 Mar 2010, Tal Galili wrote:
Hello dear R-help members,
Very soon I am to give a lecture on R. And in that lecture I intend to move
between:
Thanks for replying Brian.
Indeed, I am working on windows (XP).
I tried doing:
dev.new(record = T)
And got:
Warning message:
mode(record) differs between new and previous
== NOT changing record
But if I understood you, I could open a window with a plot, then open a new
one (with
On Wed, 3 Mar 2010, Tal Galili wrote:
Thanks for replying Brian.
Indeed, I am working on windows (XP).
I tried doing:
dev.new(record = T)
And got:
Warning message:
‘mode(record)’ differs between new and previous
== NOT changing ‘record’
But if I understood you, I could open a window
1) What are your 3 most useful R package?
On the assumption that we mean those packages that add some generic
functionality, then
plyr
ggplot2
Car and Hmisc (i know that is four)
So similar to others peoples list
I have others that are always first to be installed, but specific to
my
Hi Ralf,
1) What are your 3 most useful R package?
Its hard to pick three but since you are making me...
vegan
rgdal (which will also get you sp, another favorite)
rms
Michael
--
Michael Denslow
I.W. Carpenter Jr. Herbarium [BOON]
Department of Biology
Appalachian State University
Boone,
I would normally use 'which', as already suggested, but if, as in your
example, the 26th were the last in the series and this is known then
these would all work too to get the time of the 3rd last (2nd prior to
the last):
time(z)[length(z) - 2]
time(tail(z, 3)[1, ])
head(tail(time(z), 3), 1)
I think Duncan's example of a list that is
a matrix is a compelling argument not to do
the change.
A matrix that is a list with both names and
dimnames *is* probably rare (but certainly
imaginable). A matrix that is a list is not
so rare, and the proposed double meaning of
'$' would certainly
Hi Sylvian,
On Tue, Mar 2, 2010 at 1:15 PM, sylvain willart
sylvain.will...@gmail.com wrote:
Dear R users,
I would like to draw map and import it in maptools/spatstat packages.
The 'raw data' I have come from a web page (map.../map) and are
basically a list of coordinates of a polygon.
I
Hi,
The 3 packages I load most often are my own; typically I make a new
package for every new job. It automatically loads other packages as
dependencies (top-ranked are ggplot2, reshape, plyr) as well as my
data and functions I'm currently working with.
If some functions evolve further towards a
Hello everyone
I use zoo objects and I need to find a date 6 months before today's date.
Example, today we have 3rd March 2010, I need to find the date 3rd
September 2009.
How could I do that, please?
Regards,
Sergey
--
Simplicity is the last step of art./Bruce Lee
The more you know, the
Try this. as.Date(as.yearmon(today) - 6/12) gives the 1st of the
month 6 months ago and the remainder of that line moves ahead by d-1
days if its the d-th day of the month now.
library(zoo)
z - zoo(0:399, as.Date(2009-06-01)+0:399)
today - Sys.Date(); today
[1] 2010-03-03
ago6mos -
Hello,
I have various datasets of zoo time series (merged into single frames
via the merge command) such as
datevar0var1var2var3
08/07/1996 652.54 0.2239220.5158190.502638
08/08/1996 662.59 0.9978410.0003830.999806
06/09/1996
I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the
installation completed successfully
but right now I realized that the on-line help does not work any more.
When I type ?R-command a message pops up warning that Help will not be
available. Path not found ... regardless of
On Wed, 3 Mar 2010, Research wrote:
Hello,
I have various datasets of zoo time series (merged into single frames
via the merge command) such as
datevar0var1var2var3
08/07/1996 652.54 0.2239220.5158190.502638
08/08/1996 662.59 0.997841
On 03/03/2010 2:27 AM, Milo Phillips-Brown wrote:
Hello,
I'm trying to learn R (for fun!), and I've tried to find any previous
discussion of this problem (or something like it) and haven't found one.
When I run the following command, R seems to simply stop. I get no error
message, but I
On 03/03/2010 6:39 AM, mau...@alice.it wrote:
I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully
but right now I realized that the on-line help does not work any more.
When I type ?R-command a message pops up warning that Help will not be
I'd go a bit further and remind that the r-help posting guide is clear :
For questions about functions in standard packages distributed with R
(see the FAQ Add-on packages in R), ask questions on R-help.
If the question relates to a contributed package , e.g., one downloaded from
CRAN, try
Thanks Brian,
I wrote a tiny script employing your answer.
resize.win - function(Width=6, Height=6)
{
# works for windows
dev.off(); # dev.new(width=6, height=6)
windows(record=TRUE, width=Width, height=Height)
}
resize.win(5,5)
plot(rnorm(100))
resize.win(10,10)
plot(rnorm(100))
ad 1) ggplot2, Hmisc, RODBC
ad 2) A package to produce high quality tables with summary statistics
for publications in scientific journals.
Regards, Frank
Ralf B ralf.bie...@gmail.com 02.03.2010 21:13
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will
BTW,
If someone is willing to help with two questions - we can extend the small
code I just wrote to other OS's. It might be useful for future people who
will present R graphical outputs to an audience.
The questions are:
1) What is the equivalent of the command windows to other OS ?
2) How can
I guess your model specification is incoherent. It's seems to me that you
incorporated some kind of lmer() style with (0 + Micro/Trt/Year) term.
Consider the toy data and code below. Nesting model is m2. Models m1 and m3
are the same so showing that terms in brackets don't are used.
da -
Actually the problem exists only if I use JGR. If I launch R from a terminal
window then the text on-line help works.
It used to work with JGR too but with R version 2.9.0.
Now, JGR shows the new R version is running but the on-line help is no more
available from JGR.
Perhaps JGR implementors
Dear Gabor,
Fantastic! Thank you very much for your help, as always!
Regards,
Sergey
On Wed, Mar 3, 2010 at 12:24, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
Try this. as.Date(as.yearmon(today) - 6/12) gives the 1st of the
month 6 months ago and the remainder of that line moves ahead
On Wed, 3 Mar 2010, Tal Galili wrote:
BTW,If someone is willing to help with two questions - we can extend the
small code I just wrote to other OS's. It might be useful for future people
who will present R graphical outputs to an audience.
But none of the other standard devices supports
I have not explained this properly.
I meant to say if the ID vales of the rows in each file match, print the
data into a new dataframe with this structure
ID DATA1
2345 VALUE1 VALUE2
where value1 is from the first dataset and value2 is from the 2nd
--
View this message in context:
Hi, I'm having (yet another) problem with R.
I have a few data sets that have this sort of format
dataset1
ID DATA
1234 value
2345 value
3456 value
dataset2
ID DATA
value
2345 value
value
What i really want to do is write an R script that says if the ID of
dataset1 and 2 match
I only really need the base packages, but otherwise I suppose the most
useful for me are:
(1) RCurl
(2) plyr
(3) XML
On 2 Mar, 20:13, Ralf B ralf.bie...@gmail.com wrote:
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will create some feedback and
Okay I appreciate the help, and I appreciate the FAQ reminder. I will read
the r-help posting guide. I'm relatively new to using the support systems
around R. So far everyone has been really helpful.
I'm confused as to which data.table list I should be using.
Hi,
I want put some values in the last column of a matrix b. But every time
again there comes the same error on the screen...
b - array(0, c(5,5))
m-matrix(runif(20,0,2*pi),5) # the sinus of this kind of values i
want put in the last column of b, m is a 5*4 matrix
n-5
for(i in 1:n){
RODBC
data.table
On Wed, Mar 3, 2010 at 3:29 AM, Tony B tony.bre...@googlemail.com wrote:
I only really need the base packages, but otherwise I suppose the most
useful for me are:
(1) RCurl
(2) plyr
(3) XML
On 2 Mar, 20:13, Ralf B ralf.bie...@gmail.com wrote:
Hi R-fans,
I would
On Wed, 03 Mar 2010 13:09:09 +0100 Frank Bloos frank.bl...@med.uni-
jena.de wrote:
ad 2) A package to produce high quality tables with summary statistics
for publications in scientific journals.
Doesn't Hmisc do that (the 'latex' function)? See
Sorry to clear up the reasons why:
RODBC because it allows me to seamlessly interact with all the databases at
the place I work.
And data.table because it does aggregation about 50x times faster than plyr
(which I used to use a lot).
Thanks,
Rob
On Wed, Mar 3, 2010 at 7:07 AM, Rob Forler
On 3/3/10, BioStudent s0975...@sms.ed.ac.uk wrote:
What i really want to do is write an R script that says if the ID of
dataset1 and 2 match (2nd row), print out that whole row into a new
dataset3.
Would this do what you want?
x1 - iris[1:5,]
x1
Sepal.Length Sepal.Width Petal.Length
On Mar 3, 2010, at 5:52 AM, BioStudent wrote:
Hi, I'm having (yet another) problem with R.
I have a few data sets that have this sort of format
dataset1
ID DATA
1234 value
2345 value
3456 value
dataset2
ID DATA
value
2345 value
value
What i really want to do is
Hi
thanks for your reply,
I'll try to better explain my request...
the data do not come from a file with a specific extension, this is
just some lines I copied pasted from a source html file
The web page is:
http://www.insee.fr/fr/ppp/bases-de-donnees/donnees-detaillees/duicq/accueil.asp
it
Hi Frederik,
There is no need for the double for loop:
b[,5] - sin(runif(5,0,2*pi))
As to your question, check the values i and k take. In the first
iteration of the second loop k == 0, and R does not support an index
equal to 0. The problem is in 1:n-1, this gives 0- 4, in stead do
3 most used packages:
1)spdep (for spatial regression/statistics)
2)car
3)survival (which is recommended, so)
3.5) survey (for analysis of complex survey samples)
Best to all,
Corey
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas
On 3/2/2010 1:43 AM, Daniel Nordlund wrote:
I have been working through the book Applied longitudinal data analysis:
modeling change and event occurrence by Judith D. Singer and John B.
Willett. I have been working examples using SAS and also using it as an
opportunity for learning to use
Hello I have 2000 univariate timeSeries of about 20 observations each, as
the following, I would like to store all of them in one object, sort of a
data frame or something similar. Do you know how can I do this. Thank you
Felipe Parra
GMT
2009-10-12
2009-10-12 0.002346171
Rob Forler wrote:
And data.table because it does aggregation about 50x times faster than
plyr
(which I used to use a lot).
This is correct, from the error message its spits out one has to conclude
that is was abandoned at R-version 2.4.x
Dieter
--
View this message in context:
Hi everyone,
I would like to subset a data.frame using partial values.
For example I have the following data.frame:
PROCHI Main_condition
1234 411
1235 4110
1236 4111
1237 I20
1238I201
1239I202
Now let's say that I use the Subset function. Ordinarily I would use it
DarioAustralia wrote:
In the .R file I put in the tests directory, I have a number of cat(My
text here) type statements, that explain when a certain test completed
successfully but everything I tried so far (like putting sink(NULL) at the
top of the .R file) hasn't worked. Does someone
That in itself is a question for the maintainer, off r-help. When the
posting guide says contact the package maintainer first it means it
literally and applies even to questions about the existence of a mailing
list for the package. So what I'm supposed to do now is tell you how the
posting
Try this:
subset(x, grepl('411', Main_condition))
On Wed, Mar 3, 2010 at 11:33 AM, Newbie19_02 nvanzuy...@gmail.com wrote:
Hi everyone,
I would like to subset a data.frame using partial values.
For example I have the following data.frame:
PROCHI Main_condition
1234 411
1235
John Sorkin jsor...@grecc.umaryland.edu napsal dne 01.03.2010
15:19:10:
If it looks like a duck and quacks like a duck, it ought to behave like
a duck.
To the user a matrix and a dataframe look alike . . . except a dataframe
can
Well, matrix looks like a data.frame only on the first
Hi,
On Wed, Mar 3, 2010 at 4:08 AM, Häring, Tim (LWF)
tim.haer...@lwf.bayern.de wrote:
(...)
While you're sending your bug report to David, perhaps you can try the
SVM from kernlab.
It relies on code from libsvm, too, but ... you never know. It can't
hurt to try.
Hi Steve,
thanks for
I am attempting Anova analysis to compare results from four groups (Samp1-4)
which are lists of intensities from the experiment. I am doing this by first
creating a structured list of the data and then conducting the ANOVA (Script
provided below). Im an R beginner so am not sure if I am using
Hi,
That was a good suggestion but I should have been more specific,
PROCHIDate_admission main_condition
CAO3121534 15/08/2006 I501
28394 CAO3121534 18/04/1999 I251
28395 CAO3121534 18/10/1993 4109
28396 CAO3121534
Then:
subset(x, grepl('410|I25', main_condition))
On Wed, Mar 3, 2010 at 11:59 AM, Newbie19_02 nvanzuy...@gmail.com wrote:
Hi,
That was a good suggestion but I should have been more specific,
PROCHI Date_admission main_condition
CAO3121534 15/08/2006
Thanks again for the help but what I am having trouble with is that I get:
1012 CAO0103166 01/04/1999 I200
1016 CAO0103166 03/05/2000 I200
1024 CAO0103166 20/06/1997 I209
1025 CAO0103166 25/02/1999 I209
1027 CAO0103166 27/08/1999
1) quantmod, zoo, xts, TTR in no particular order, the first requires the
others, so I can't really separate them.
2) There are plenty of packages for my needs (using R as a hobbyist), but my
biggest concern is that they lack active support. A package for complex testing
of trading strategies
Dear Chuck and Daniel,
First, thanks Chuck for fielding the question, which I didn't notice in
r-help.
I can get solutions for models A, B, and C using the automatic start values
along with the argument par.size=startvalues to sem() (as recommended in
?sem if there are convergence problems). For
Petr,
On the other hand . . .
mat-matrix(1:12, 3,4)
dat-as.data.frame(mat)
mat
[,1] [,2] [,3] [,4]
[1,]147 10
[2,]258 11
[3,]369 12
dat
V1 V2 V3 V4
1 1 4 7 10
2 2 5 8 11
3 3 6 9 12
What you are demonstrating by your example is the
On Mar 3, 2010, at 7:45 , mau...@alice.it mau...@alice.it wrote:
Actually the problem exists only if I use JGR.
Make sure you upgrade JGR. You need JGR 1.7 or higher to work with R
2.10. If you have any questions, please use the JGR mailing list stats-
rosuda-devel.
Thanks,
Simon
If
Hi
that is why I consider matrix is just a vector with dimensions and
data.frame is a rectangular structure similar to Excel table. That saved
me a lot of surprises.
But I must admit I am not a real beginner nowadays although I still learn
when using R, reading help list and trying sometimes
Hi
r-help-boun...@r-project.org napsal dne 03.03.2010 08:27:27:
Hello,
I'm trying to learn R (for fun!), and I've tried to find any previous
discussion of this problem (or something like it) and haven't found one.
When I run the following command, R seems to simply stop. I get no error
hello R,
This is about simulation in psychomtrics in IRT in R. I want to simulate b
parameters(item difficulty) with moments of fixed values of mean, st.d,
skewness and kurtosis. Is there any specific IRT package in R with those
functions to control those moments? I have seen other programs that
other than base :
1. XML Rcurl2. lattice3. Hmisc
On Tue, Mar 2, 2010 at 10:13 PM, Ralf B ralf.bie...@gmail.com wrote:
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will create some feedback and discussion.
1) What are
Hi,
are your dataframes really called file1 and file2? Then, it will be
something like this:
test
Links:
--
[1]
http://n4.nabble.com/Matching-rows-in-a-Data-set-I-m-Stuck-tp1576432p1576523.html
[2]
(link removed) =
--
View this message in context:
Unfortunately its complaining that 'by.x' and 'by.y' specify different
numbers of columns'.
I don't really see why that matters if your matching tbh...
I'm having a few problems. Merge is definitely what I want but my files are
way too big and i'm having memory trouble. Plus I figures out the
Thanks!
I'm just trying to do it now but having issues with memory...
test - merge(file1, file2, by.x = col1)
will this give me the output I was hoping for
ID VALUE1 VALUE2
?
Thanks
--
View this message in context:
Hi
r-help-boun...@r-project.org napsal dne 01.03.2010 16:36:27:
Hi Petr,
Thanks again for trying again with these data, I really appreciate it.
Your script works perfectly, but the problem I'm having is how to store
the
model results so after your script I would do:
I think Brian and Josh the two powerhouses behind quantmod and other finance
related packages are working on a package called 'blotter' which is on
r-forge which may be able to help you with keeping track and doing some
testing of trading strategies.
regards,
cj
On
On Mar 3, 2010, at 7:24 AM, BioStudent wrote:
Thanks!
I'm just trying to do it now but having issues with memory...
test - merge(file1, file2, by.x = col1)
will this give me the output I was hoping for
ID VALUE1 VALUE2
?
Thanks
If you are going to use 'by.x' then you also
Dear John,
Thanks very much for your message. I should have looked at the help
page for sem() more closely. Thanks again for your excellent work on
the package.
Regards,
Chuck
On 3/3/2010 10:18 AM, John Fox wrote:
Dear Chuck and Daniel,
First, thanks Chuck for fielding the question,
What is your entire dataset and the code used to do this?
On Wed, Mar 3, 2010 at 12:04 PM, Newbie19_02 nvanzuy...@gmail.com wrote:
Thanks again for the help but what I am having trouble with is that I get:
1012 CAO0103166 01/04/1999 I200
1016 CAO0103166 03/05/2000
Hi,
I have an issue with the write.table command:
I have a dataset, with many rows and 3 columns. I give a row example:
alexiaroger,delphine roger,bruno,sandra
I fist process the data to be able to process the column entries as vectors:
mo-readLines(c:\\data.txt,n=-1)
Others answered your question. I would however suggest that you asked the
wrong question.
If you really feel the need for your future self to serve some serious penance
for past or near future misdeeds, then continuing with this strategy is one way
to do that (just please don't inflict your
On Wed, 2010-03-03 at 09:45 -0600, Helen Lisman wrote:
hello R,
This is about simulation in psychomtrics in IRT in R. I want to simulate b
parameters(item difficulty) with moments of fixed values of mean, st.d,
skewness and kurtosis. Is there any specific IRT package in R with those
functions
to simulate from IRT models have a look at function rmvlogis() from
package ltm.
I hope it helps.
Best,
Dimitris
On 3/3/2010 6:05 PM, Stuart Luppescu wrote:
On Wed, 2010-03-03 at 09:45 -0600, Helen Lisman wrote:
hello R,
This is about simulation in psychomtrics in IRT in R. I want to
The simRasch function in MiscPsycho package simulates person abilities using
N(mu, sigma^2) and items from U(-x,x), which is not what you're asking for.
But, I also am not sure how you would manipulate the other moments. However,
item parameters tend not to be normally distributed in
Correct.
Ralf
---
Ralf Bierig
Post-Doctoral Associate
School of Communication and Information
Rutgers University
New Brunswick, NJ 08901-1071, USA
On Wed, Mar 3, 2010 at 4:16 AM, Philippe Grosjean
phgrosj...@sciviews.org wrote:
On 03/03/10 09:26, Karl Ove Hufthammer wrote:
On Tue, 2 Mar
Chuck and John,
Thank you both for your help. I figured that my problem was trying to work
through a new area for me, and trying to learn a new package for that area at
the same time. You have both provided examples that clarified things that I
either didn't understand about SEM in general
I use rms, lme4, ggplot2 frequently (also lattice and MASS).
On Tue, Mar 2, 2010 at 3:13 PM, Ralf B ralf.bie...@gmail.com wrote:
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will create some feedback and discussion.
1) What are your 3 most useful R
Dieter,
One way to check if a package is active, is by looking on r-forge. If you
are referring to data.table you would have found it is actually very active
at the moment and is far from abandoned.
What you may be referring to is a warning, not an error, with v1.2 on
R2.10+. That was fixed
azman wrote:
i'am is new in R software.i have try to make a function but it can't give
what it should.i dunno what have to do next.
Can somebody help me to solve it.i'll very appreciate...
Your example is nice, because it is self-contained (even if there is a
buglet). When I run it, I
If R made
matrix$columnName
mean the same as
matrix[, columnName]
(a vector) so matrices looked more like data.frames,
would we also want the following to work
as they do with data.frames?
with(matrix, log(columnName)) # log of that column as a vector
matrix[columnName] # 1-column
I find myself loading the TeachingDemos package most often, though in my case
there may be one of those chicken/egg things going on.
I also use MASS and rms quite a bit (if we are limited to 3, but I also use
survival, Hmisc, and splines, but they are loaded with rms).
The package that I
Hi all,
Assume the following function that generate a random number.
z1-function (n, eta)
{
wv - runif(n)
wz - (-1/eta) * log(wv)
wz
}
y - z1(100,4)
mean(y)
I want to run this function say 1000 times and I want to count if
the mean(y) outside the following range 0.20
Can anybody explain to me how to calculate Eigen values for linear
discriminants, which have been identified in the scaling matrix of a LDA
analysis [lda()].
cheers
~~
Robert Lonsinger
Wildlife Grad. Research Assistant
New Mexico State University
Dept. of Fish,
Dear R users,
I am trying to read a huge file in R. For some reason, only a part of the
file is read. When I further investigated, I found that in one of my
non-numeric columns, there is one odd character responsible for this, which
I reproduce bellow:
In case you cannot see it, it looks like a
May doing a cumsum restricted on each date could help, I remember I read
someone doing this on a post...because once i do this i will be able to
discriminate the numbers different from 1.
-
Anna Lippel
--
View this message in context:
Thanks David for the thoughts. The challenge I have with this approach is that
the criteria I have is defined by a series of tests--which I do not think I
could substitute in in place of the logical indexing.
In the combinations code I was hoping there is a step where, each new
combination is
Hello R lovers,
I have a vector of dates and signals. I want to filter the signals per day
in a way that only the first signal of the day remains like this:
Dates Signals Filtered Signal
2006-11-02 00
2006-11-02 11
Try this:
sum(!findInterval(colMeans(replicate(1000, z1(100, 4))), 0.2:0.3))
On Wed, Mar 3, 2010 at 4:15 PM, Val valkr...@gmail.com wrote:
Hi all,
Assume the following function that generate a random number.
z1-function (n, eta)
{
wv - runif(n)
wz - (-1/eta) * log(wv)
SOLVED,
example from the Nord-Pas-de-Calais region:
v -
c(237,55,236,58,229,57,214,57,203,55,197,54,187,48,179,46,179,35,180,31,184,26,197,23,201,24,202,31,207,34,213,31,216,37,219,41,228,46,234,47,237,55)
seqx - seq(1,length(v),by=2)
seqy -
Thank you Henrique,
However,
F1-sum(!findInterval(colMeans(replicate(100, z1(100, 4))), 0.2:0.3))
F2-sum(findInterval(colMeans(replicate(100, z1(100, 4))), 0.2:0.3))
the sum of the two (F1+F2) = number of replicates (in this case 100).
Sometimes I do not get that sum. Do you know why?
Val
ifelse(ave(signals, dates , FUN=cumsum) = 1, 1, 0)
-
Anna Lippel
--
View this message in context:
http://n4.nabble.com/filtering-signals-per-day-tp1577044p1577102.html
Sent from the R help mailing list archive at Nabble.com.
__
Try this:
f$Filtered - unlist(sapply(unstack(f, Signals ~ Dates),
function(.x)tabulate(which(as.logical(.x))[1], length(.x
On Wed, Mar 3, 2010 at 4:20 PM, anna lippelann...@hotmail.com wrote:
Hello R lovers,
I have a vector of dates and signals. I want to filter the signals per day
in a
Tena koe Anna
The following appears to do what you want (anna is a dataframe
containing the data you provided):
anna$Test - anna$Signals
anna[duplicated(paste(anna$Dates, anna$Signals)),'Test'] - 0
anna
Dates Signals Filtered.Signal Test
1 02-11-06 0 00
2 02-11-06
1 - 100 of 145 matches
Mail list logo