Hi R,
I need to see the inner code behind the function svm in the package
e1071. I enter svm in the console and get the below output.
svm
function (x, ...)
UseMethod(svm)
environment: namespace:e1071
Is there any way I can look into the code of what svm (support vector
machine) is
Hi
I do not like complicated paste cycles too much so I would prefer
for (i in 1:4) print(na.omit(all.data[ ,last.char(names(all.data)) %in%
col_names[i] ]))
with last.char function like this
last.char-function(x) substring(x, first=nchar(x), last=nchar(x))
Regards
Petr
Hi
Does this do it ... ?
useOuterStrips(hexbinplot(Transferin ~ Age | factor(Race) + factor(Sex),
data=NHANES, type=r,
aspect=1,
scales=
list(x=list(relation=free, rot=0,
Hi listers,
I am working on a program in order to create an ellipse as a limit of my
observations there are well classified.
I have two independent variables for an quadratic discriminant function
between 2 groups where my mean is zero and my covariance matrix is
proportional.
Q=y'Ay+c
My program
Hello!
I use R 2.8.1 under Debian GNU/Linux. I've run into a problem
including R pdf figures into LaTeX document. To reproduce:
1) Execute the following minimal R script:
pdf('fig.pdf', family = 'URWTimes', width = 5, height = 5)
plot(rnorm(10), main = 'Тест', xlab = 'Абсцисса', ylab =
Hi I am using the following data set:
cond |ex |symbol |corr |g127 |price |siz |tdate |tseq |ttim |
T |T |MSFT |0 |0 |121.125 |1500 |01MAY1997 |0 |28862 |
T |T |MSFT |0 |0 |121.5625 |500 |01MAY1997 |0 |28944 |
The following R code is attached.
When I am executing the
Emmanuel Charpentier wrote:
Le jeudi 09 avril 2009 à 15:04 +0200, Philippe Grosjean a écrit :
Hello Rusers,
I have worked on a R Wiki page for solutions in exporting R graphs,
especially, the often-asked questions:
- How can I export R graphs in vectorized format (EMF) for inclusion in
MS
Dear R-friends,
Could you please help me with a problem?
I have a table with 4 columns: P,Z,S,T.
Sometimes z is smaller than s, sometimes z is greater than t. For these
smaller/greater z-values, I do need the associated p-value (see example below).
I need the whole range of a and b, but I
Dear R-friends,
Could you please help me with a problem?
I have a table with 4 columns: P,Z,S,T.
Sometimes z is smaller than s, sometimes z is greater than t. For these
smaller/greater z-values, I do need the associated p-value (see example below).
I need the whole range of a and b, but I
Hi Duncan,
Thanks for your thoughts. trim=FALSE does not fix my issues, so I attach
pared down versions of my script and data file. Thanks for any further hint.
Joh
Duncan Temple Lang wrote:
Hi Johannes
I would guess that the trimming of the text occurs because
you do not specify trim
Hi,
I have used this command :
resamples-lapply(1:1000,function(i) sample(lambs,replace=F))
resamples2-lapply(resamples,Cusum)
to get a list of 1000 samples of my data. The function Cumsum is defined as
follows:
Cusum-function(x){
SUM-cumsum(x)-(1:length(x))*mean(x)
herbert8...@gmx.de wrote:
Dear R-friends,
Could you please help me with a problem?
I have a table with 4 columns: P,Z,S,T.
Sometimes z is smaller than s, sometimes z is greater than t. For these
smaller/greater z-values, I do need the associated p-value (see example below).
I need the whole
Hi Melissa,
L - list(min=rnorm(5),mean=rnorm(5),max=rnorm(5))
matrix(unlist(L),ncol=3)
gives what you want
Alain
Melissa2k9 wrote:
Hi,
I have used this command :
resamples-lapply(1:1000,function(i) sample(lambs,replace=F))
resamples2-lapply(resamples,Cusum)
to get a list of 1000
Pages 43-45 of this Rnews are an article by Uwe Ligges that should
answer all of your questions:
http://cran.r-project.org/doc/Rnews/Rnews_2006-4.pdf
--
David Winsemius
On Apr 10, 2009, at 2:40 AM, Shubha Vishwanath Karanth wrote:
I need to see the inner code behind the function svm in the
Dear Melissa,
Use sapply instead of lapply and name the output vector of your Cusum
function. Note that I have simplified that function.
Cusum - function(x){
SUM - cumsum(x) - seq_along(x) * mean(x)
c(Min = min(SUM), Max = max(SUM), Diff = diff(range(SUM)))
}
lambs - rnorm(10)
Hi,
A very simple question.
I know that the Fourier transform of a Laplace distribution, with zero
mean and variance 2b^2, is equal to 1/(1+(tb)^2). Therefore, the Fourier
transform is a positive function (actually is always between 0 and 1).
BUT, if I use the fft(alpha) function of R, where
Is it really a table? (That is a specific class of object in R.)
You seem to be accessing it as a data.frame. Perhaps something along
the lines of (untested):
subset(fig8, (Z S | Z T) )$P
--
David Winsemius
On Apr 10, 2009, at 5:54 AM, herbert8...@gmx.de wrote:
Dear R-friends,
Could
Андрей Парамонов cmr.pent at gmail.com writes:
Hello!
I use R 2.8.1 under Debian GNU/Linux. I've run into a problem
including R pdf figures into LaTeX document. To reproduce:
[snip snip snip]
I would suggest forwarding this request to the r-devel
mailing list ...
Hi,
I read your message on a forum, about your wish to estimate Han Hausman
model on R. Did you find a solution?
Best,
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
To further add to this discussion. I would like to propose
**cross-platform** solutions, emphasizing that the proposed solutions
should work on Windows, Mac OS X and Ubuntu, at least.
First of all, inclusion of a simple EPS graphs produced by R 2.9.0 with:
setEPS(); postscript(TestGraph.eps,
Hi there,
I'm trying to realise a repport with R and Latex (TeXnicCenter and Miktex for
Windows) using Sweave().
I'd like to save my plots with a given size. How can I do that ? The issue is
that I have several plots created (but it's not always the same numbers of
plots, in depends on the
Genius! Thanks very much Hadley - that was surprisingly easier to solve than I
was anticipating!
As a way of offering something back in return, I don't know if you plan to
release a new version of the reshape package, but here's a suggestion to
consider, just in case you do.
On the basis of
Hi,
I read almost all I found in prior R-Help list about How to compare
two regression line slopes.
So, I made a didactic example to illustrate a solution cited by Ben Bolker:
===
Subject:Re: [R] How to compare two regression line slopes
From:
Dear Mao Jianfeng,
r-help-owner is not the place for help, but:
r-help@r-project.org
(CC-ed here)
In any case, strsplit() does the job, i.e.:
unlist(strsplit(BCPy01-01, -))
[1] BCPy01 01
You can work with the whole variable, like:
splitpop - strsplit(df1$popcode, -)
then access the first part
Hi Group,
I posted this question on the ggplot list and was advised to try here
also. The code
below produces a plot as a png and pdf. The pdf looks great, and I cannot
make the png look this way. I've tried various combinations of
height, width, and dpi, but it has not worked out so
far. Any
try this,
do.call(rbind, resample2)
#or simply,
replicate(1000, Cusum(sample(lambs,replace=F)))
you could also look at the plyr package.
Hope this helps,
baptiste
On 10 Apr 2009, at 09:03, Melissa2k9 wrote:
Hi,
I have used this command :
resamples-lapply(1:1000,function(i)
Hi,
To be honest, I cannot really understand what is the meaning of the votes..
For example having five samples and two classes what the numbers below
means?
healthy unhealthy
1 0.85714286 0.14285714
2 0.92857143 0.07142857
3 0.9000 0.1000
4 0.92857143 0.07142857
5 0.84615385
Dear, R-lister,
I have a dataframe like the followed. And, I want to split a character
variable (popcode, or codetot) into several new variables. For example,
split BCPy01-01 (in popcode) into BCPy01 and 01. I need to know how to
do that. I have tried strsplit() and substring() functions. But, I
strsplit() is the way to do it, but if your putative
character strings come from a data.frame you need to make
sure they are really character strings and not factors
(at least in R 2.8.1).
d-data.frame(name=c(Bill Dunlap, First Last), num=1:2)
d
name num
1 Bill Dunlap 1
Good observation, Bill!
Adrian
On Friday 10 April 2009, William Dunlap wrote:
strsplit() is the way to do it, but if your putative
character strings come from a data.frame you need to make
sure they are really character strings and not factors
(at least in R 2.8.1).
Dear all,
Is there a way to do it?
The following code:
pdf(test.pdf)
plot(1,1,col=red)
dev.off()
Only colors the plot into red, but not
x and y axis (inclusive the tick marks).
- Gundala Viswanath
Jakarta - Indonesia
__
R-help@r-project.org
Dear Random Forests gurus,
I have a question about R^2 provided by randomForest (for regression).
I don't succeed in finding this information.
In the help file for randomForest under Value it says:
rsq: (regression only) - pseudo R-squared'': 1 - mse / Var(y).
Could someone please explain in
plot(..., axes=FALSE)
axis(...)
?plot; ?axis
Bert Gunter
Genentech Nonclinical Biostatistics
650-467-7374
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Gundala Viswanath
Sent: Friday, April 10, 2009 8:26 AM
To:
Gundala Viswanath wrote:
Dear all,
Is there a way to do it?
The following code:
pdf(test.pdf)
plot(1,1,col=red)
dev.off()
Only colors the plot into red, but not
x and y axis (inclusive the tick marks).
See ?par and arguments such as fg, col.axis, col.lab ...
Uwe Ligges
- Gundala
On 08-Apr-09 23:39:36, Ted Harding wrote:
On 08-Apr-09 22:10:26, Ravi Varadhan wrote:
EM algorithm is a better approach for maximum likelihood estimation
of finite-mixture models than direct maximization of the mixture
log-likelihood. Due to its ascent properties, it is guaranteed to
On 09/04/2009 8:07 AM, Richard Morey wrote:
Hi everyone,
I saw this problem dealt with here:
http://markmail.org/search/list:r-project?q=integrate#query:list%3Ar-project%20integrate+page:1+mid:qczmyzr676pgmaaw+state:results
but no one answered that request that I can tell. I'm having the same
Hello,
On Thu, Apr 9, 2009 at 3:04 PM, Philippe Grosjean
phgrosj...@sciviews.org wrote:
Cross-platforms solution to export R graphs
There is playwith, and latticist, which seem cross-platform (binaries
available for both MacWin). rattle uses latticist.
Rcmdr can be used for saving graphs.
On Thu, Apr 9, 2009 at 3:04 PM, Philippe Grosjean
phgrosj...@sciviews.org wrote:
The page is at:
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:export.
The article suggests to use Inksacpe for PDF - SVG conversion.
I've recently experimented this, but it seems that the graph
Just to hopefully complete this for the record.
Johannes attachment didn't make it to the list, but
in an off-list conversation, I believe the problem
is not trimming of text (i.e. removing leading and trailing whitespace)
but apparent truncation of text in an XML node.
The xmlEventParse()
Hello,
Could anyone tell me how to plot data on two different scales in the same axis
in the same plot?
Here is my quandary:
The range of my X axis runs from 0 to 10, but the majority of my meaningful data
lies between 7 and 10. The data from 0 to 7 is essentially noise.
Is there a way for me
Look at the gap.plot function in the plotrix package. It may work for you, or
if not, looking at the code may give you some ideas of how to make a similar
plot with the different scales that you want.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
Dear George,
Take a look at the twoord.plot function in the plotrix package.
HTH,
Jorge
On Fri, Apr 10, 2009 at 1:37 PM, George Chen glc...@stanford.edu wrote:
Hello,
Could anyone tell me how to plot data on two different scales in the same
axis in the same plot?
Here is my quandary:
Hi Group,
For the plot below, are there other ways I can use more of the
plotting space. I've tweaked the parameters I know of.
I could also put the plot titles inside the plot if there is a way to
do that. Thanks for your input. Regards, Juliet
p1 - runif(1000) # sample data
qp1 - qqmath(~
Hello all,
I would like to count the number of events that occur per minute for
some measurements I have taken. I would eventually like to look at
the sums of some of the measurements for the grouped events. I think
I am not understanding how to use the returned value from the trunc
function
I think the problem is that
(a) trunc(POSIXct.object) returns a POSIXlt object
instead of a POSIXct object.
(b) length(POSIXlt.object) always returns 9 (the
number of components in the object, not the number
of time entries) while length(POSIXct.object)
returns the
Hello Mao,
If the popcode variable has a fixed number of characters (i.e each entry
has 9 characters), you can use a simple call to substr:
dat-read.table(clipboard, header=T)#Read from your email
varleft-substr(dat$popcode,0,6)
varright-substr(dat$popcode,8,9)
I've written a recursive function to extract the members of an
individual cluster within a hierarchical clustering. I have something
that works, but the return value has a list structure I don't like. I
know how to work around with 'unlist()' but I suspect the function
could be fixed.
Hello R-community,
I want to generate stacked density plots in lattice. My data consist of a
numeric variable ('pid') that is measured in different individuals ('id'),
which can be divided in two types ('type') and the measurements were repeated a
different time points ('day').
I read in
Hi Everyone,
I'm new to programming R and have accomplished my goal, but feel that there
is probably a more efficient way of coding this. I'd appreciate any
guidance that a more advanced programmer can provide.
My goal --
I would like to find the length of the longest word in a string
Dear R-gurus:
I have a question about lmer.
Basically, I have a dataset, in which each observation records number of
trials (N) and number of events (Y) given a covariate combination(X) and
group id (grp_id).
So, my dataset is in tabular form. (in case my explanation of tabular form
is unclear,
On Fri, Apr 10, 2009 at 2:40 PM, Shadley Thomas
shadley.tho...@gmail.com wrote:
[snip]
My question --
It seems inefficient to determine which element is the longest and then
calculate the length of that longest element. I was hoping to find a way to
simply return the length of the longest
On Apr 10, 2009, at 3:40 PM, Shadley Thomas wrote:
Hi Everyone,
I'm new to programming R and have accomplished my goal, but feel
that there
is probably a more efficient way of coding this. I'd appreciate any
guidance that a more advanced programmer can provide.
My goal --
I would like to
See ?lmer and notice model gm1 in the examples.
As with glm, a binomial lmer model can have the response specified as
a two-column matrix with the columns giving the numbers of successes
and failures.
hth,
Kingsford Jones
On Fri, Apr 10, 2009 at 2:48 PM, Sean Zhang seane...@gmail.com wrote:
Hi there,
I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot
package when there is a missing combination of the factor levels.
Unfortunately the standard errors on the plot do not appear to be correct.
Consider an analysis consisting of two factors A and B. When all
On 10/04/2009, at 11:44 PM, Achilleas Achilleos wrote:
Hi,
A very simple question.
I know that the Fourier transform of a Laplace distribution, with zero
mean and variance 2b^2, is equal to 1/(1+(tb)^2). Therefore, the
Fourier
transform is a positive function (actually is always between 0
On Apr 10, 2009, at 4:53 PM, Judith Flores wrote:
Hello R-community,
I want to generate stacked density plots in lattice. My data
consist of a numeric variable ('pid') that is measured in different
individuals ('id'), which can be divided in two types ('type') and
the measurements
Dear All-
I am trying to create a legend where the first 9 terms are represented as
pch=16 in one column (which I am able to do); but, I would like the last two
terms in that column to be 'lines (which are black and red - just as it looks
like in the plot). I have read through many help pages
On Fri, Apr 10, 2009 at 1:53 PM, Judith Flores jur...@yahoo.com wrote:
Hello R-community,
I want to generate stacked density plots in lattice. My data consist of a
numeric variable ('pid') that is measured in different individuals ('id'),
which can be divided in two types ('type') and
On Fri, Apr 10, 2009 at 11:23 AM, Juliet Hannah juliet.han...@gmail.com wrote:
Hi Group,
For the plot below, are there other ways I can use more of the
plotting space. I've tweaked the parameters I know of.
I could also put the plot titles inside the plot if there is a way to
do that.
Using strapply, we extract all strings of word characters
and apply nchar to each simplifying by taking the max.
library(gsubfn)
strapply(shadstr, \\w+, nchar, simplify = max)
See the info on the gsubfn home page:
http://gsubfn.googlecode.com
as well as the vignette, help file and demos.
On
Hi
I have been having issue with a ML estimator for Jump diffusion process but
know I am get little error I didn't notice before like I am try to create a
vector
#GBMPJ MLE Combined Ph 1 LR
#
n-length(combinedlrph1)
j-c(1,2,3,4,5,6,7,8,9,10)
Error in c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) :
On Fri, 10 Apr 2009, From Watchman wrote:
Hi
I have been having issue with a ML estimator for Jump diffusion process but
know I am get little error I didn't notice before like I am try to create a
vector
#GBMPJ MLE Combined Ph 1 LR
#
n-length(combinedlrph1)
j-c(1,2,3,4,5,6,7,8,9,10)
Error in
So, to complete Bill Dunlap's thought and combine it with your desired goal,
I believe this gets you what you wanted...
start.time - as.POSIXct(2009-04-10 12:00:00)
event.times - start.time + c(1,2,3,61,62,122,135,200)
event.values - rnorm(length(event.times))
et -
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999
http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000
Hi All:
I just want to try some luck.
I am currenly working on my project,one part of my project is to
reanalysis the kenward cattle data by using the
64 matches
Mail list logo