> t <- c(
+ "",
+ "01001001011011101100",
+ "1001001011010101",
+ "1101110100000011",
+ "000100100101001001011001",
+ "000101101101101001101001")
> {
+ cat ('rom_array := (\n');
+ for (i in 1:length(t)) {
+
Hi, R experts:
I am trying to generate data output in the following format:
rom_array := (
"",
"01001001011011101100",
"1001001011010101",
"1101110100000011",
"000100100101001001011001",
"00010110110110100
Hi i need help
with this data set
http://books.google.com.au/books?id=vWu-MJM_obsC&pg=PA62&dq=M345+statistical+methods+unit+13#PPA62,M1
what grouping methods could i use?
--
View this message in context:
http://www.nabble.com/Grouping-methods-tp23715866p23715866.html
Sent from the R help mailin
I see. So if I want to draw a rectangle by a function outside the
expose_fn, I need to refer to the drawable within the expose_fn. One
possibility is to use an environment, so I can refer to it
dynamically. Thanks,
Ronggui
2009/5/25 Michael Lawrence :
>
>
> On Sat, May 23, 2009 at 8:27 AM, Ronggu
Manuel Morales wrote:
On Mon, 2009-05-25 at 06:22 -0500, Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
On May 24, 2009, at 3:34 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
Great,
thanks Manuel.
Just
expand.grid(i,j)
On Mon, May 25, 2009 at 8:26 PM, alad wrote:
>
> Hi,
>
> I have:
> i = c(1,2,3)
> j = c(4,5,6)
>
> How do I create a matrix of all pairs?
> i.e.
> 1,4
> 1,5
> 1,6
> 2,4
> :
>
> Thanks!
>
>
> --
> View this message in context:
> http://www.nabble.com/How-to-create-all-pairs-tp237
?expand.grid
e.g.
M <- expand.grid(i = 1:3, j = 4:6)
You can coerce it to a matrix if that is really what you want.
Bill Venables
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of alad
S
Is this what you want:
> i = c(1,2,3)
> j = c(4,5,6)
> expand.grid(i,j)
Var1 Var2
114
224
334
415
525
635
716
826
936
>
On Mon, May 25, 2009 at 7:26 PM, alad wrote:
>
> Hi,
>
> I have:
> i = c(1,2,3)
> j = c(4,5,6)
>
> H
Dear alad,
Try this:
expand.grid(i,j)
See ?expand.grid for more details.
HTH,
Jorge
On Mon, May 25, 2009 at 7:26 PM, alad wrote:
>
> Hi,
>
> I have:
> i = c(1,2,3)
> j = c(4,5,6)
>
> How do I create a matrix of all pairs?
> i.e.
> 1,4
> 1,5
> 1,6
> 2,4
> :
>
> Thanks!
>
>
> --
> View this me
Hi,
I have:
i = c(1,2,3)
j = c(4,5,6)
How do I create a matrix of all pairs?
i.e.
1,4
1,5
1,6
2,4
:
Thanks!
--
View this message in context:
http://www.nabble.com/How-to-create-all-pairs-tp23714659p23714659.html
Sent from the R help mailing list archive at Nabble.com.
_
On Mon, 2009-05-25 at 06:22 -0500, Frank E Harrell Jr wrote:
> Jarle Bjørgeengen wrote:
> >
> > On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote:
> >
> >> Jarle Bjørgeengen wrote:
> >>> On May 24, 2009, at 3:34 , Frank E Harrell Jr wrote:
> Jarle Bjørgeengen wrote:
> > Great,
> >
Hi all!
I was looking for a software which does Piecewise Aggregate Approximation of
time series data for dimensionality reduction. I have read some papers which
have mentoned the technique but no mention about the software used was given
any where. Any suggestions about it would be appreciated. T
jim holtman wrote:
> You have to return a value from the function in the lapply and assign the
> result to another object:
>
>
>> df <- data.frame(a=1,b=2,c=3,d=4)
>> a <- list(df,df,df,df)
>> # to change the name of the second, you have to change the name and then
>>
> return
>
>> # the
Hi:Â you have to return the dataframe inside the lapply. I also changed =
to <- but I doubt that matters.
d1 <- data.frame(x1=1,x3=4)
d2 <- data.frame(x1=2,x3=5)
d3 <- data.frame(x1=3,x3=6)
d4 <- data.frame(x1=4,x3=7)
a = list(d1,d2,d3,d4)
print(a)
lapply(a,function(.df
Hi Ravi!
Ravi Varadhan wrote:
>
> Yes. Most classical optimization methods (e.g. gradient-type,
> Newton-type) are "local", i.e. they do not attempt to locate the
> global optimum.
Ah .. I see.
> The primary difficulty with global optimization is that there are no
> mathematical conditions tha
Berend Hasselman wrote:
If you do
resopt <- optim(-5,f, method="SANN",control=list(fnscale=-1))
you will get the global maximum. SANN: simulated annealing. But starting
in -4 takes you to the local maximum.
So if I understand correctly, this method would also yield the same
sort of result
You have to return a value from the function in the lapply and assign the
result to another object:
> df <- data.frame(a=1,b=2,c=3,d=4)
> a <- list(df,df,df,df)
> # to change the name of the second, you have to change the name and then
return
> # the dataframe as the return value and assign it bac
On 25/05/2009 5:36 PM, Charles Annis, P.E. wrote:
I'm not sure how not to use chm help, since that's the only way I've ever
done things.
But why would things work well from a USB Flash Drive and not for a CD when
the folders are identical? (The CD was burned from the image on the Flash
Drive.)
Hi,
Say I have dataframes d1, d2, ... , dn, and I want to apply a
function to all of them. For example, say I want to change the name
of the second variable in each dataframe to "x2". The following doesn't work:
a = list(d1,d2,d3,d4)
lapply(a,function(x) names(x)[2] = "x2")
What would work
x <- 1; y <- 2
# 1
paste("x is", x, "y is", y)
# 2
sprintf("x is %d, y is %d", x, y)
# 3
library(gsubfn)
fn$cat("x is $x, y is $y\n")
For the last one see http://gsubfn.googlecode.com
If we preface a function by fn$ then it interpolates
strings subject to some qualifications, e.g.
fn$sqlQuery(
I'm not sure how not to use chm help, since that's the only way I've ever
done things.
But why would things work well from a USB Flash Drive and not for a CD when
the folders are identical? (The CD was burned from the image on the Flash
Drive.)
Charles Annis, P.E.
charles.an...@statisticaleng
On 25/05/2009 5:18 PM, Charles Annis, P.E. wrote:
After reading your suggested page, it does appear that the problem is a
security feature that I will have to live with since the CDs will be running
on borrowed computers.
BUT, if the same R-folder is loaded from a USB Flash Drive, rather than a
After reading your suggested page, it does appear that the problem is a
security feature that I will have to live with since the CDs will be running
on borrowed computers.
BUT, if the same R-folder is loaded from a USB Flash Drive, rather than a
CD, the help files work just fine. So perhaps there
On 25/05/2009 4:40 PM, Charles Annis, P.E. wrote:
Dear R-helpers:
I created a folder containing R on a read-only CD and use it by having the
R-icon, located on the Windows desktop, point to the CD
(R-2.8.1\bin\Rgui.exe) for the "Target," and to a Windows Desktop folder for
"Start in."
This wo
?paste
e.g.,
sql <- paste("select YPOS, XPOS, YEAR, MONTH, RANGE, APFEL,",
"TEMPMIN, TEMPAVG, TEMPMAX, PRECIPITATION, SUNDURATION from DATA where
YPOS=",
ypos, " AND XPOS=", xpos, " AND MONTH BETWEEN 1 AND 12 AND RANGE = 1;",
sep="")
On Mon, May 25, 2009 at 4:26 PM, John Fitzgerald <
joh
Dear R-helpers:
I created a folder containing R on a read-only CD and use it by having the
R-icon, located on the Windows desktop, point to the CD
(R-2.8.1\bin\Rgui.exe) for the "Target," and to a Windows Desktop folder for
"Start in."
This works nicely EXCEPT that the R help() function cannot d
Hi everyone,
I am desperately looking for a method to interpolate strings within an SQL
statement as follows:
I get a lot of rows out of a database (in my example POSITION_to_ZIPCODE
Database with holds records for German ZIP Code <--> Gauss-Krueger
Coordinate System ) and want this to be selecte
spencerg wrote:
Frank E Harrell Jr wrote:
spencerg wrote:
Dear Frank, et al.:
Frank E Harrell Jr wrote:
Yes; I do see a normal distribution about once every 10 years.
To what do you attribute the nonnormality you see in most cases?
(1) Unmodeled components of variance that c
Hi all!
i'm trying to write a particular function:
it is as follows:
Pi greek (x):
- has values from R(n) to the [0, 1] interval
- the function Pi Greek(-x)=1-Pi Greek(x)
now the question:
how i could set the codomain to that interval??
thanks very much!
..fede!
[[alternative HTML vers
It worked fine for me without using much memory. Take a look at you
statements and you will see that you are missing a comma on the dimensions:
> n <- 58000
> max_out <- data.frame(Lat=runif(n), Long=runif(n), Model=sample(1:12, n
,TRUE),
+ Obs=sample(1:12, n, TRUE))
> str(max_out)
'data.fram
Hi,
Does anyone know how to generate block designs using the AlgDesign
package? I have a experimental design with 1024 combinations and need to
reduce it.
Thanks!
Edson
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing lis
Dear Simo,
Apparently the input covariance matrix is a list rather than a numeric
matrix. Without the input that you specified, it's not possible to know for
sure what you did, but I suspect that you used the object returned by
hetcor() in the polycor package rather than the polychoric correlation
Hi friends,
Can somebody help me out please?
I have to create a string for a particular if condition , with some
values(returned by function1) which are always variable.
*Step-I* Suppose function1 returns a dataframe like this,shown below with
two values 3 and 4:---
x
1 3
2 4
*STEP-II *For
Dear R Users,
I have a data frame of 4 columns and ~58000 rows, the top of which looks like
this:
> head(max_out)
Latitude Longitude Model Obs
1-0.25-49.25 4 4
2-0.25-50.25 4 5
3-0.25-50.75 4 4
4-0.25-51.25 311
5-0.25-5
Dear All,
I am trying to run a program using SEM and the input data is a covariance
matrix (polychoric correlations). However I get an error message which says:
is.triangular(S) : (list) object cannot be coerced
to 'double'
Do not know what the problem is. Have do
Duncan, thx - installing GTK fixed the issue :)
-zubin
Duncan Murdoch wrote:
On 5/25/2009 9:43 AM, zubin wrote:
Hello, running windows vista, R2.9. Installed the following
libraries: (*latticist*, *playwith* and *Cairo*)
Wanted then to run, to evaluate the visualization features:
data(ir
On 5/25/2009 9:43 AM, zubin wrote:
Hello, running windows vista, R2.9. Installed the following libraries:
(*latticist*, *playwith* and *Cairo*)
Wanted then to run, to evaluate the visualization features:
data(iris)
library(latticist)
latticist(iris)
However, i tested my desktop and
Most likely you did not install the dependent DLLs: you need Gtk2
(aka GTk+) installed *and in your path*.
That message does not say that 'cairoDevice.dll' cannot be loaded, but
a DLL it specified: in interactive use on recent versions of Windows
you normally get a pop-up with more information
Depending on what you want (haven't checked the speed) you could try
this one where
we have changed the ldlc in the first row so that it has none > 130
for id=1 just to
illustrate that case as well:
> d <- data.frame(id = c(rep(1, 3), rep(2, 2), 3), age=c(5, 10, 15, 4, 7, 12),
+ ldlc=c(122, 120
Hi, Gabor:
Is there a general search capability with
"https://stat.ethz.ch/pipermail/r-sig-finance";? We can review the
archives there by Thread, Subject, Author or Date within quarter, but I
don't see anything that allows me to input a search term.
Thanks,
Spencer
Gabor
Frank E Harrell Jr wrote:
spencerg wrote:
Dear Frank, et al.:
Frank E Harrell Jr wrote:
Yes; I do see a normal distribution about once every 10 years.
To what do you attribute the nonnormality you see in most cases?
(1) Unmodeled components of variance that can generate
erro
Hello, running windows vista, R2.9. Installed the following libraries:
(*latticist*, *playwith* and *Cairo*)
Wanted then to run, to evaluate the visualization features:
>data(iris)
>library(latticist)
>latticist(iris)
However, i tested my desktop and laptop and get the following error
afte
Your google search or
daily data site:https://stat.ethz.ch/pipermail/r-sig-finance/
both seem to give reasonable results.
On Mon, May 25, 2009 at 9:45 AM, spencerg wrote:
> Hi, Gabor, et al.:
>
> What's the best way to search the R-SIG-Finance archives? Are R-SIG-*
> included in any of the
On May 25, 2009, at 7:45 AM, David Freedman wrote:
Dear R,
I've got a data frame with children examined multiple times and at
various
ages. I'm trying to find the first age at which another variable
(LDL-Cholesterol) is >= 130 mg/dL; for some children, this may never
happen.
I can do t
Dear David,
You would speed up things is you first create a subset were all values
of ldlc is >= 130. Then you only have to find the lowest age for each
child in this subset.
HTH,
Thierry
ir. Thierry Onkelinx
Institu
Hi, Gabor, et al.:
What's the best way to search the R-SIG-Finance archives? Are
R-SIG-* included in any of the main R search engines (at
"http://www.r-project.org/search.html";)? Gmane has an option for
"gmane.comp.lang.r.finance", but when I tried it just now, I got, "No
such group
Hi,
Does anyone know how to generate block designs using the AlgDesign
package? I have a experimental design with 1024 combinations and need to
reduce it.
Thanks!
Edson
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing li
On Sat, May 23, 2009 at 8:27 AM, Ronggui Huang wrote:
> Thanks, Michael. Just one more follow-up question. Is there other way
> to get the "GdkDrawable" (here da2) without using <<- or other
> assignment operation from within expose_fn? I thought
> da$GetRootWindow() would work, but it does not.
>
It looks promising. I saw the pdf
at:http://cran.r-project.org/web/packages/caret/vignettes/caretMisc.pdf.
I will give it a try.
Thank you.
onyourmark wrote:
>
> Hi. I started with a file which was a sparse 982x923 matrix and where the
> last column was a variable to be predicted. I did principl
Hello,
I'd like to obtain parameters for my poisson data. Having made the function
poisregfun = function(a,b) {Y.pred = exp(a + b*x) - sum(dpois(y, lambda =
Y.pred, log = TRUE))}
where Y is a vector of data to be regressed on another vector x.
I'm asking for
mle2( poisregfun, start = list(a = 2
Hi
r-help-boun...@r-project.org napsal dne 22.05.2009 18:53:37:
>
> Hi all,
> I had some trouble in regrouping factor levels for a variable. After
some
> experiments, I have figured out how I can recode to modify the factor
levels.
> I would now like some help to understand why some methods
Dear R,
I've got a data frame with children examined multiple times and at various
ages. I'm trying to find the first age at which another variable
(LDL-Cholesterol) is >= 130 mg/dL; for some children, this may never happen.
I can do this with transformBy and ddply, but with 10,000 different
c
Check out the xts, zoo and quantmod packages.
xts has a vignette (pdf document) and zoo has
three vignettes.
Also look at:
?read.zoo in zoo to read your data, or
?getSymbols in quantmod.to fetch data from the net, and
the discussion list:
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
On M
Jarle Bjørgeengen wrote:
On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
On May 24, 2009, at 3:34 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
Great,
thanks Manuel.
Just for curiosity, any particular reason you chose standard error
, and not confidence
Problem solved. Current script is at
http://finzi.psych.upenn.edu/~baron/inst.R
This makes all the help files in html format without installing any
packages.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do r
milton ruser wrote:
> Hi Maura,
>
> It is not "elegant" but may work.
>
>
> actual.string<- "12345abcdefgh12345abcdefgh"
> actual.string
> actual.string<-paste(substr(actual.string,
> nchar(actual.string),nchar(actual.string)),
>substr(actual.string, 1,nchar(actual.string)-1), sep="")
> actual.
Hello
I have daily S&P 500 from 1950 for which I would like to do some time
series analysis in R. Could someone please show me an example of how to
create a ts/ irts object for my data? Additionally, how do I create
monthly subsamples of the data. I've experimented with the window
function but
stephen sefick wrote:
if you are on a .nix then in a terminal move to the directory that
contains the tar ball of the packages and type R CMD install
foo.tar.bz
... same if you are on Windows (as it seems to be the case), but before,
you need to install the tools mention in the manual R Inst
Martin Ivanov wrote:
Dear R users,
I need a produce a plot with a single panel and a few lines on it. Each line represents a different data set.
The line types must be "h", i.e. ‘histogram’ like (or ‘high-density’) vertical lines. The problem
is that the vertical lines comprising a plot line of
Romain Francois wrote:
> Hollix wrote:
>> Hi there,
>>
>> say, I have 100 matrices (m1,m2,...,m100) which I want to combine in
>> a list.
>> The list, thus, shall contain the matrices as components.
>>
>> Is it necessary to mention all 100 matrices in the list() command? I
>> would
>> like to use j
Hi,
d is the side-length of a square in the grid.
Please, post your questions regarding ade4 to adelist
(http://listes.univ-lyon1.fr/wws/info/adelist)
Cheers,
heike.zimmerm...@botanik.uni-halle.de wrote:
Dear R-helpers,
I have perfomed a BPCA (dudi.pca, between, package=ade4) and visualis
On May 24, 2009, at 4:42 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
On May 24, 2009, at 3:34 , Frank E Harrell Jr wrote:
Jarle Bjørgeengen wrote:
Great,
thanks Manuel.
Just for curiosity, any particular reason you chose standard
error , and not confidence interval as the default
62 matches
Mail list logo