See
?pdf
?png
?sink
There is also R2wd (about which I wrote here:
http://www.r-statistics.com/2010/05/exporting-r-output-to-ms-word-with-r2wd-an-example-session/
)
And there are also the "brew", and "Sweave" packages (as Henrique
mentioned).
Best,
Tal
Contact
Details:-
Thanks Bill, that worked great!!
> You ask:
# How can I use predict here, 'newdata'
> crashes
predict(m1,newdata=wolf$predicted);wolf # it doesn't work
To
> use predict() you need to give a fitted model object (here m1) and a *data
> frame* to specify the values of the predictors for which y
Here is another one that works:
> do.call(subset, list(dat, subsetexp))
x y
6 6 6
7 7 7
8 8 8
9 9 9
10 10 10
>
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Vadim Ogranovich
Sent: Saturday, 26 June 2010 11:13
Your intuition is wrong and R is right.
Why should the product of two probability density functions be a normalized pdf
also?
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Carrie Li
Sent: Saturday, 26 June 2010 1:28 PM
To: r-he
Hi:
On Fri, Jun 25, 2010 at 6:12 PM, Vadim Ogranovich <
vogranov...@jumptrading.com> wrote:
> Dear R users,
>
> Please disregard my previous post "converting result of substitute to
> 'ordidnary' expression". The problem I have has nothing to do with
> substitute.
>
> Consider:
>
> > dat <- data.
On Wed, 23-Jun-2010 at 12:05AM -0700, azam jaafari wrote:
|> ?Hello
|> ?
|> I have questions about gbm package.??It seems we have to?devide data to two
part (training?set and test set) for first.
|> ?
|> 1- trainig set for?running of gbm function
|> 2- test set for?gbm.perf???
|> ?
|> is it rigt
On Fri, Jun 25, 2010 at 8:59 PM, Vadim Ogranovich
wrote:
> Dear R users,
>
>
> As substitute() help page points out:
> Substituting and quoting often causes confusion when the argument
> is 'expression(...)'. The result is a call to the 'expression'
> constructor function and needs to
Hello everyone,
I have a question about integration of two density function
Intuitively, I think the value after integration should be 1, but they are
not. Am I missing something here ?
> t=function(y){dnorm(y, mean=3)*dnorm(y/2, mean=1.5)}
> integrate(t, -Inf, Inf)
0.3568248 with absolute error
On Fri, 25 Jun 2010, Vadim Ogranovich wrote:
Dear R users,
As substitute() help page points out:
Substituting and quoting often causes confusion when the argument
is 'expression(...)'. The result is a call to the 'expression'
constructor function and needs to be evaluated with 'eva
>>I had taken the opposite tack with Google Trends by subtracting
> keywords
>>like:
>>SAS -shoes -airlines -sonar...
>>but never got as good results as that beautiful "X code for" search.
>>When you see the end-of-semester panic bumps in traffic, you know
> you're
>>nailing it!
>
> I have to eat t
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Muenchen, Robert A (Bob)
> Sent: Friday, June 25, 2010 5:39 AM
> To: Liviu Andronic
> Cc: r-help@r-project.org
> Subject: Re: [R] Popularity of R, SAS, SPSS, Stata...
>
>
>
>
Dear All:
I have been trying to remove "Inf" values from a series of data
(multiple ratio operations). I have tried the na.rm() function (and
tried this inside mean(), median(), and var()) but this does not always
work. Though the !is.finite() or is.infinite() functions appear to be
very prom
Dear R users,
Please disregard my previous post "converting result of substitute to
'ordidnary' expression". The problem I have has nothing to do with substitute.
Consider:
> dat <- data.frame(x=1:10, y=1:10)
> subsetexp <- expression(5 ## this does work
> subset(dat, eval(subsetexp))
x y
You ask:
# How can I use predict here, 'newdata' crashes
predict(m1,newdata=wolf$predicted);wolf # it doesn't work
To use predict() you need to give a fitted model object (here m1) and a *data
frame* to specify the values of the predictors for which you want predictions.
Here wolf$predicted is
Dear R users,
As substitute() help page points out:
Substituting and quoting often causes confusion when the argument
is 'expression(...)'. The result is a call to the 'expression'
constructor function and needs to be evaluated with 'eval' to give
the actual expression object.
merge(sum_plan_a,data,by="plan_a")
Cheers
Joris
On Sat, Jun 26, 2010 at 2:27 AM, Yi wrote:
> Hi, folks,
>
> Please first look at the codes:
>
> plan_a=c('apple','orange','apple','apple','pear','bread')
> plan_b=c('bread','bread','orange','bread','bread','yogurt')
> value=1:6
> data=data.frame(p
On Fri, Jun 25, 2010 at 5:24 PM, Joris Meys wrote:
> Just want to add that if you want to clean out the NA rows in a matrix
> or data frame, take a look at ?complete.cases. Can be handy to use
> with big datasets. I got curious, so I just ran the codes given here
> on a big dataset, before and aft
Hi:
I am using a subset of the below dataset to predict PRED_SUIT for
the whole dataset but I am having trouble with 'newdata'. The model
was created with 153 records and want to predict for 208 records.
wolf2 <- structure(list(gridcell = c(367L, 444L, 533L, 587L, 598L, 609L,
620L, 629L, 641L, 6
Hi, folks,
Please first look at the codes:
plan_a=c('apple','orange','apple','apple','pear','bread')
plan_b=c('bread','bread','orange','bread','bread','yogurt')
value=1:6
data=data.frame(plan_a,plan_b,value)
library(plyr)
library(reshape)
mm=melt(data, id=c('plan_a','plan_b'))
sum_plan_a=cast(mm,
Just want to add that if you want to clean out the NA rows in a matrix
or data frame, take a look at ?complete.cases. Can be handy to use
with big datasets. I got curious, so I just ran the codes given here
on a big dataset, before and after removing NA rows. I have to be
honest, this is surely an
On Fri, Jun 25, 2010 at 5:10 PM, Seth wrote:
>
> Hi,
> Let's say I have a data frame (called "example") with numeric values stored
> (columns V1 and V2). I also have a string variable storing this name
>
> x1<-"example"
>
> Is there a way to use the variable x so that R knows that I want the
> sp
I am trying to add labels equal to the value in a levelplot. I believe that
panel may be the way to go but cannot understand the examples.
In the following example:
X,Y,Z
A,M,100
A,M,200
B,N,150
B,N,225
I would like to label each of the rectangles 100,200,150 and 225 and colour
according to the
Hi,
Let's say I have a data frame (called "example") with numeric values stored
(columns V1 and V2). I also have a string variable storing this name
x1<-"example"
Is there a way to use the variable x so that R knows that I want the
specified action to occur on the data frame? For example, summ
ylim = extendrange(c(0,100)) ?
On 26 June 2010 01:42, David Warren wrote:
> Hi all,
>
> I'm working on some plots using lattice (R 2.10.1), and have entered
> the polish phase. I've produced a satisfactory pair of xyplots (
> http://imgur.com/EyXGi.png), but would like to align the y-axes of
Thanks for the link, very interesting book. Yet, I couldn't find the
part about EDMA. It would have surprised me anyway, as the input of
multidimensional scaling is one matrix with euclidean distances
between your observations, whereas in EDMA the data consist of a
number of distance matrices.
Qui
btw, if you just wanted your exact code to work:
t(as.matrix(aggregate(t(as.matrix(DF)),list(rep(1:1,each=2)),mean,
na.rm=TRUE)[,-1]))
You will get NaNs rather than NAs where you are missing from both
rows, but that should not be a real issue.
--
Joshua Wiley
Ph.D. Student, Health Psychology
Hello Eric,
I am not sure how your need to use list() will fit in with this, but
for your sample data, this will do the trick.
matrix(rowMeans(DF, na.rm=TRUE), ncol=1)
HTH,
Josh
On Fri, Jun 25, 2010 at 4:08 PM, emorway wrote:
>
> Forum,
>
> Using the following data:
>
> DF<-read.table(textCon
Eric -
What you're describing is taking the mean of each row while
ignoring missing values:
apply(DF,1,mean,na.rm=TRUE)
[1] 22.60NaNNaNNaNNaNNaNNaNNaN 102.00 19.20
[11] 19.20NaNNaNNaN 11.80 7.62NaNNaNNaNNaN
[21]NaN 75.00N
Forum,
Using the following data:
DF<-read.table(textConnection("A B
22.60 NA
NA NA
NA NA
NA NA
NA NA
NA NA
NA NA
NA NA
102.00 NA
19.20 NA
19.20 NA
NA NA
NA NA
NA NA
11.80 NA
7.62 NA
NA NA
NA NA
NA NA
NA NA
NA NA
75.00 NA
NA NA
18.30 18.2
NA NA
NA NA
8.44 NA
18.00 NA
N
Albert -
The message refers to a file specifically called ".RData".
Files with subscripts of .rdata are not related.
You can see your current working directory by typing
getwd()
at the R prompt.
I'm not sure where "rattle" enters into the picture.
I just installed the R 2.11.1 version on my computer and I encountered a fatal
error: "Unable to restore saved data in .RData" and kick me out of R right
away. I still can run 2.10.2. There is no package called "rattle"
I checked various posts regarding this error. I still can't get it to wo
Thanks, that was the pointer I needed. I'd tried the split parameter but
didn't realize that it doesn't work well within wireframe() itself,
rather, I had to call print.trellis() directly using the trellis object
that wireframe() returns if one assigns it to something.
After that, it was prett
See ?Sweave
On Fri, Jun 25, 2010 at 12:58 PM, Pedro Mota Veiga wrote:
>
> Hi R users,
> How can I automatically export results and graphs to a file?
> Thanks in advance
>
> Pedro Mota Veiga
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Export-Results-tp2268622p2268622.htm
Hello,
I am trying to calculate Diebold Mariano test statistic (DM) using dm.test
module. I also try to do the same thing with STATA and I get vastly different
results (4.5 vs 25). Does someone have experience with this module?
I tried to calculate the DM statistic manually. If by “d” I define
Hi all,
I'm working on some plots using lattice (R 2.10.1), and have entered
the polish phase. I've produced a satisfactory pair of xyplots (
http://imgur.com/EyXGi.png), but would like to align the y-axes of the top
and bottom plots. I assume that I need to adjust axis padding or something
Hi R users,
How can I automatically export results and graphs to a file?
Thanks in advance
Pedro Mota Veiga
--
View this message in context:
http://r.789695.n4.nabble.com/Export-Results-tp2268622p2268622.html
Sent from the R help mailing list archive at Nabble.com.
___
Always nice to answer my own question 3 minutes later. The missing()
function does what I want. Still, why DOES this exists() statement
fail? Do functions "auto create" the variables once they are called,
regardless of whether or not they are assigned?
--j
On Fri, Jun 25, 2010 at 1:05 PM, Jona
I'm a bit confused about how exists() work within a function -- I want
to test for unassigned variables, but I'm doing tests in the main
environment to figure out the function, so the variables DO exist in
the parent environment of a function call.
Why does:
myfunction <- function(variable_outside
>-Original Message-
>From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org]
>On Behalf Of Muenchen, Robert A (Bob)
>Sent: Friday, June 25, 2010 3:08 PM
>To: Joris Meys; Dario Solari
>Cc: r-help@r-project.org
>Subject: Re: [R] Popularity of R, SAS, SPSS, Stata...
>
>I had
?sweep
On Fri, Jun 25, 2010 at 2:43 PM, wrote:
> I am trying to check the results from an Eigen decomposition and I need to
> force a scalar multiplication. The fundamental equation is: Ax = lx. Where
> 'l' is the eigen value and x is the eigen vector corresponding to the
> eigenvalue. 'R' re
Dear all,
I would like to hear from anyone who has experience using R to simulate and
visualise the formation and growth of crystals.
Thank you.
mpl
--
View this message in context:
http://r.789695.n4.nabble.com/Modelling-Crystal-Growth-tp2268746p2268746.html
Sent from the R help mailing list
The solution Felix suggested worked:
It was indeed helpful to include the line
par.setttings=list(superpose.symbol=sup.sym)
while using.auto key with a customized symbol list in lattice.
Thanks Felix!
Seth
[[alternative HTML version deleted]]
___
I had taken the opposite tack with Google Trends by subtracting keywords
like:
SAS -shoes -airlines -sonar...
but never got as good results as that beautiful "X code for" search.
When you see the end-of-semester panic bumps in traffic, you know you're
nailing it!
I see that there's a car, the R
x=c('germany','poor italy','usa','england','poor italy','japan')
y=c('Spain','germany','usa','brazil','england','chile')
s=1:6
z=3:8
test=data.frame(x,y,s,z)
#Now I only concern the countries ('germany','england','brazil'). I would
like to keep the rows where these three countries
#are involved
Try this:
test[rowSums(mapply('%in%', test[c('x', 'y')],
list(c('germany','england','brazil' > 0,]
On Fri, Jun 25, 2010 at 4:00 PM, Yi wrote:
> Hi, folks,
>
> Finally Friday~~ Here comes the question:
>
> x=c('germany','poor italy','usa','england','poor italy','japan')
> y=c('Spain','german
On Thu, 24 Jun 2010, Atte Tenkanen wrote:
On Jun 23, 2010, at 9:58 PM, Atte Tenkanen wrote:
Thanks. What I have had to ask is that
how do you test that the data is symmetric enough?
If it is not, is it ok to use some data transformation?
when it is said:
"The Wilcoxon signed rank test does
Hi, folks,
Finally Friday~~ Here comes the question:
x=c('germany','poor italy','usa','england','poor italy','japan')
y=c('Spain','germany','usa','brazil','england','chile')
s=1:6
z=3:8
test=data.frame(x,y,s,z)
#Now I only concern the countries ('germany','england','brazil'). I would
like to ke
The layout function is base graphics, wireframe from lattice is grid based and
they don't play well together without extra effort. The simplest option will
probably be to look at the help page for print.trellis, specifically the split
and more arguments. Then look at the examples to see if thi
Let me see if I understand. You actually have the data for the whole
population (the entire piece) but you have some pre-defined sections that you
want to see if they differ from the population, or more meaningfully they are
different from a randomly selected set of measures. Is that correct?
Hi all,
I'm trying to print a number of wireframe plots (generated using the
lattice package), and I want them to appear in a two-by two matrix along
with some other (standard) plots. In other words I am trying to create a
subplot or tiled plot that works for wireframes.
I've tried the metho
Atte, I would not wonder if you got lost and confused by the certainly
interesting methodological discussion that has been going on in this thread.
Since the helpers do not seem to converge/agree, I propose to you to use a
different nonparametric approach: The bootstrap. The important thing about
I am trying to check the results from an Eigen decomposition and I need to
force a scalar multiplication. The fundamental equation is: Ax = lx. Where 'l'
is the eigen value and x is the eigen vector corresponding to the eigenvalue.
'R' returns the eigenvalues as a vector (e <- eigen(A); e$values
I am trying to check the results from an Eigen decomposition and I need to
force a scalar multiplication. The fundamental equation is: Ax = lx. Where 'l'
is the eigen value and x is the eigen vector corresponding to the eigenvalue.
'R' returns the eigenvalues as a vector (e <- eigen(A); e$values
Thanks! That was exactly what I was looking for.
Best,
Stefan
On Fri, Jun 25, 2010 at 12:37 PM, Kevin E. Thorpe
wrote:
> Kevin E. Thorpe wrote:
>>
>> stefan.d...@gmail.com wrote:
>>>
>>> Hi,
>>> I am using Sweave to write an article. If I want to convert the *.rnw
>>> to a *.tex file I have to r
Please disregard. I've posted to the wrong site.
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034
steve_fried...@nps.gov
Office (305) 224 - 4282
Fax (305) 224 - 4147
There is a freely downloadable and very relevant (& readable) book at
https://ccrma.stanford.edu/~dattorro/mybook.html
"Convex Optimization and Euclidean Distance geometry", and it indeed names EDMA
as a form of multidimensional scaling (or maybe in the oposite way).
You should have a look
at the c
Hello
Trying to develop variograms and kriged surfaces from a point file. Here is
what I've done so far.
library(gstat) # also loads library(sp)
library(lattice)
soilpts$x <- soilpts$UTM_X
soilpts$y <- soilpts$UTM_Y
soil.dat <- subset(soilpts, select=c(x, y, Area, BulkDensity, LOI, TP, TN,
> I'm having the same problem as Stephan (see below), but what I'm trying to
> jitter is not a numeric vector, but a factor. How do I proceed? (Naively
> jittering a factor makes it numeric, no longer factor, so I don't get the
> custom ordering which conveniently comes with using a factor. I'm not
Hi Ralf,
?pdf and ?png are good places to start.
There is also R2wd:
http://cran.r-project.org/web/packages/R2wd/index.html
For exporting R output to word. I wrote a short tutorial session for it
here:
http://www.r-statistics.com/2010/05/exporting-r-output-to-ms-word-with-r2wd-an-example-sessio
You still are stating the effect of the central limit theorem
incorrectly. Please see my previous note.
Frank
On 06/25/2010 10:27 AM, Joris Meys wrote:
> 2010/6/25 Frank E Harrell Jr:
>> The central limit theorem doesn't help. It just addresses type I error,
>> not power.
>>
>> Frank
>
> I don
You posted the exact same question several days ago (June 17) under a
different name.
You got two perfectly good and adequate answers.
/Berend
--
View this message in context:
http://r.789695.n4.nabble.com/no-subject-tp2268375p2268685.html
Sent from the R help mailing list archive at Nabble.co
On Fri, Jun 25, 2010 at 11:34 AM, bruno Piguet wrote:
> Hi all,
>
> I'm looking for a function which could do some fast and simple
> re-sampling of asynchronous time series.
>
> Below is a MCE of the kind of algorithm I need. As you can see, it's
> quite crude, but it's enough for my current n
We have 3-Dimensional MRI density recordings of tumor tissue and would like
to have a measure of "patchiness", reflecting cluster size in the tissue.
For 2-D slices, correlogram from MASS works well. Does someone know of a
packages that provides a 3-D generalization of this measure? Or any
alterna
Hi Nana,
The question is not fully clear to me.
Are you looking to plot the (let's call it) "family tree" of the genes ?
(if so, then using
plot(hclust(gene.dist))
Might be a direction for you)
Tal
Contact
Details:---
Contact
On Fri, 25 Jun 2010, bruno Piguet wrote:
Hi all,
I'm looking for a function which could do some fast and simple
re-sampling of asynchronous time series.
Below is a MCE of the kind of algorithm I need. As you can see, it's
quite crude, but it's enough for my current needs. The only problem
Bert,
thanks for the pointer, added to the devel version of "fortunes" on
R-Forge.
thx,
Z
On Fri, 25 Jun 2010, Bert Gunter wrote:
"On average, any data manipulation that can be described in a sentence or
two of English can be programmed in one line in R. If you find yourself
writing a long
To add to/modify what Joris (and I) previously said:
1. qqplots are not cumulative distribution plots. Hence, as Joris said, the
S-shape indicates short tails/bimodality compared to the normal. Why you
continue to insist on carrying out normality tests that with so many points
obviously will reje
On Fri, Jun 25, 2010 at 11:11 AM, Gabor Grothendieck
wrote:
> On Fri, Jun 25, 2010 at 10:48 AM, Sebastian Kruk
> wrote:
>> If I have a text with 7 words per line and I would like to put first
>> and second word joined in a vector and the rest of words one per
>> column in a matrix how can I do it
On Fri, Jun 25, 2010 at 4:17 PM, Bert Gunter wrote:
> "On average, any data manipulation that can be described in a sentence or
> two of English can be programmed in one line in R. If you find yourself
> writing a long 'for' loop to do something that sounds simple, take a step
> back and research
Hi all,
I'm looking for a function which could do some fast and simple
re-sampling of asynchronous time series.
Below is a MCE of the kind of algorithm I need. As you can see, it's
quite crude, but it's enough for my current needs. The only problem is that
it is quite slow on real use case
2010/6/25 Frank E Harrell Jr :
> The central limit theorem doesn't help. It just addresses type I error,
> not power.
>
> Frank
I don't think I stated otherwise. I am aware of the fact that the
wilcoxon has an Asymptotic Relative Efficiency greater than 1 compared
to the t-test in case of skewed
"On average, any data manipulation that can be described in a sentence or
two of English can be programmed in one line in R. If you find yourself
writing a long 'for' loop to do something that sounds simple, take a step
back and research if an existing combination of functions can easily handle
you
help("strsplit") is your friend, for example:
t <- c("2008/12/31 12:23:31 numero 343.233.233 Rodeo Vaca Ruido",
"2010/02/01 02:35:31 palabra 111.111.222 abejorro Rodeo Vaca")
m <- do.call(rbind, strsplit(t, "[[:space:]]+")) # Matrix of all the data
v <- paste(m[, 1], m[, 2]) # The vect
On Fri, Jun 25, 2010 at 10:48 AM, Sebastian Kruk
wrote:
> If I have a text with 7 words per line and I would like to put first
> and second word joined in a vector and the rest of words one per
> column in a matrix how can I do it?
>
> First 2 lines of my text file:
> "2008/12/31 12:23:31 numero 3
If I have a text with 7 words per line and I would like to put first
and second word joined in a vector and the rest of words one per
column in a matrix how can I do it?
First 2 lines of my text file:
"2008/12/31 12:23:31 numero 343.233.233 Rodeo Vaca Ruido"
"2010/02/01 02:35:31 palabra 111.111.22
Maybe something like:
y <- readLines("foo")
z <- strsplit(y, ",")
cols <- sort(unique(unlist(z))) # Assuming this is what you want for
column names
m <- matrix(0, nrow=length(z), ncol=length(cols),
dimnames=list(as.character(1:length(z)), cols))
for (i in 1:length(z)) {
m[i, z[[i]]]
The central limit theorem doesn't help. It just addresses type I error,
not power.
Frank
On 06/25/2010 04:29 AM, Joris Meys wrote:
> As a remark on your histogram : use less breaks! This histogram tells
> you nothing. An interesting function is ?density , eg :
>
> x<-rnorm(250)
> hist(x,freq=F)
I am trying to estimate an Arrhenius-exponential model in R. I have one
vector of data containing failure times, and another containing
corresponding temperatures. I am trying to optimize a maximum likelihood
function given BOTH these vectors. However, the optim command takes only
one such vect
Dear useRs,
at the beginning,
Joris Meys, thank you for explaining how to obtain calculation result possible
for groups between string marks in one variable in data frame, like in this
example below (between START and STOP), wchich I would like to complete at the
end by asking about... how is
Please read the posting guide : http://www.R-project.org/posting-guide.html
Your question is very vague. One could assume you're completely new to
R and want the commands to read a csv file (see ?read.csv), and to
write away a table (eg ?write.table to write your predicted data in a
text format).
>-Original Message-
>From: Liviu Andronic [mailto:landronim...@gmail.com]
>Sent: Friday, June 25, 2010 7:15 AM
>To: Muenchen, Robert A (Bob)
>Cc: r-help@r-project.org
>Subject: Re: [R] Popularity of R, SAS, SPSS, Stata...
>
>On Sun, Jun 20, 2010 at 2:31 PM, Muenchen, Robert A (Bob)
> wrot
Try this also:
cbind(dataTest, `colnames<-`(cbind(new.data[1:nrow(dataTest)]), name))
On Fri, Jun 25, 2010 at 2:47 AM, Ralf B wrote:
> Hi all,
>
> I have this (non-working) script:
>
> dataTest <- data.frame(col1=c(1,2,3))
> new.data <- c(1,2)
> name <- "test"
> n.row <- dim(dataTest)[1]
> leng
Hey,
I only got the output once cuz I was returning from the function at the end
of one loop.
I set that right and I have printed the values.
function being used by me now is:
function(x)
{
for(i in 1:length(x))
{
print(names(x[i]))
print(myets(x[[i]]))
}
}
where myets is my customized exponentia
On Jun 25, 2010, at 7:09 AM, phani kishan wrote:
On Fri, Jun 25, 2010 at 1:54 PM, Paul Hiemstra
wrote:
On 06/25/2010 10:02 AM, phani kishan wrote:
Hey,
I have a data frame x which consists of say 10 vectors. I
essentially want
to find out the best fit exponential smoothing for each of
Hello,
I'm new in using the R, but from what I read is an excellent tool.
Would you like if I could help, I am trying create an array from
reading a text file.
The idea is to read the file, and transform the data in binary
format, for example. The calves of this file format.
A,B
thanks for your interests Joris
Gokhan OCAKOGLU
Uludag University
Faculty of Medicine
Department of Biostatistics
http://www20.uludag.edu.tr/~biostat/ocakoglui.htm
--
View this message in context:
http://r.789695.n4.nabble.com/Euclidean-Distance-Matrix-Analysis-EDMA-in-R-tp2266797p2268257.h
Optim uses vectors of _parameters_, not of data. You add a
(likelihood) function, give initial values of the parameters, and get
the optimized parameters back. See ?optim and the examples therein. It
contains an example for optimization using multiple data columns.
Cheers
Joris
On Fri, Jun 25, 20
On Jun 25, 2010, at 5:43 AM, Dennis Murphy wrote:
Hi:
Here's one approach:
x <- rep(c(1,2,1,3,5), each=5)
rle(x)
Run Length Encoding
lengths: int [1:5] 5 5 5 5 5
values : num [1:5] 1 2 1 3 5
table(rle(x)$values)
1 2 3 5
2 1 1 1
unname(table(rle(x)$values))[1]
[1] 2
This method doe
Check out the brew package, by Jeff Horner.
Ralf B wrote:
> I assume R won't easily generate nice reports (unless one starts using
> Sweave and LaTeX) but perhaps somebody here knows a package that can
> create report like output for special cases? How can I simply plot
> output into PDF?
> Perha
On Jun 25, 2010, at 1:00 AM, song song wrote:
my list al is as below:
al=list(c(2,3),5,7)
al
[[1]]
[1] 2 3
[[2]]
[1] 5
[[3]]
[1] 7
and I check the second component, its element is 5, then I remove
this, now
my al is:
al[[2]][al[[2]]!=5]->al[[2]]
al
[[1]]
[1] 2 3
[[2]]
numeric(0)
[
I'd suggest having a look at the manuals on the
[url=http://www.r-project.org][b]R[/b][/url]site, especially the Introduction
to R and R Data Import/Export.
Some helpful tutorials may be found at
http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html and
http://www.sph.umich.edu/csg/abecasis/class
On Sun, Jun 20, 2010 at 2:31 PM, Muenchen, Robert A (Bob)
wrote:
> come up with so far at http://r4stats.com/popularity . I'm sure people
> will have plenty of ideas on how to improve this, so please let me know
> what you think.
>
This is not much of a metric, probably not even a ballpark, but I
On Fri, Jun 25, 2010 at 1:54 PM, Paul Hiemstra wrote:
> On 06/25/2010 10:02 AM, phani kishan wrote:
>
>> Hey,
>> I have a data frame x which consists of say 10 vectors. I essentially want
>> to find out the best fit exponential smoothing for each of the vectors.
>>
>> The problem while I'm gettin
Kevin E. Thorpe wrote:
stefan.d...@gmail.com wrote:
Hi,
I am using Sweave to write an article. If I want to convert the *.rnw
to a *.tex file I have to run Sweave which might take a long time. Is
there away to get a tex-file as result without (evaluating) the
R-chunks, i.e. the opposite of tangl
On 25.06.2010 06:39, suman dhara wrote:
Sir,
I want to apply mclapply() function for my analysis. So, I have to install
multicore package. But I can not install the package.
install.packages("multicore")
It gives that package multicore is not available.
Can you help me?
If this is Windo
stefan.d...@gmail.com wrote:
Hi,
I am using Sweave to write an article. If I want to convert the *.rnw
to a *.tex file I have to run Sweave which might take a long time. Is
there away to get a tex-file as result without (evaluating) the
R-chunks, i.e. the opposite of tangle (that just gives R-chu
On 06/25/2010 05:47 AM, dan.weavesham wrote:
Hello,
Thanks for the advice so far -- still struggling with it, I must admit.
Here is some sample data, which I hope helps:
# y axis #1 -- data for the bar chart
-30353.382 -21693.519 -7049.923 -72968.722 -10267.584 -269432.795
-19847.670 -686
I've been looking around myself, but I couldn't find any. Maybe
somebody will chime in to direct you to the correct places. I also
checked the papers, and it seems not too hard to implement. If I find
some time, I'll take a look at it next week.
For the other two gentlemen, check:
http://www.geta
Hi:
Here's one approach:
> x <- rep(c(1,2,1,3,5), each=5)
> rle(x)
Run Length Encoding
lengths: int [1:5] 5 5 5 5 5
values : num [1:5] 1 2 1 3 5
> table(rle(x)$values)
1 2 3 5
2 1 1 1
> unname(table(rle(x)$values))[1]
[1] 2
HTH,
Dennis
On Fri, Jun 25, 2010 at 2:30 AM, Muhammad Rahiz <
muha
Hi all,
I'd like to find how many sets of 1s there are in the following example;
x <- rep(c(1,2,1,3,5), each=5)
I know that there are two sets of 1s, visually. Any function in R that
allows me to automate the process?
Thanks.
Muhammad
__
R-help@
1 - 100 of 115 matches
Mail list logo