Hii,
Can anybody help me, I don't know how to print the median. Below is my
code snipplet...
x
-read.table(file=D:/Uni/Diplom/Diplom/Grafiken/R/BATMAN/Kabel/Batman1hop/Standardabweichung__output_30_1_Kabel(30m)_b.txt)
png(filename = D:/Grafiken/R/Standardabweichung/Kopie.png, width = 640,
You may refer to the last example in ?layout
Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872,
Dear R helpers
I am trying to fit the Gumbel distribution to a data. I am using lmom package.
I am getting problem in Cumulative Distribution Function of Gumbel distribution
as I am getting it as a series of 0's and 1's thereby affecting the P P Plot.
My R code is as follows.
Altough it depends on what crit you keep your variables, but maybe you should
take a look at ?step.
Bart
Paul Hermes wrote:
ok,
i think i have to be more precise of what we are doing.
first thing: this code is not from me, and Im new to R (and never touched
anything like this)
Im
Hi all,
I have the following data
AAA 1e+06 1222.312
AAC 100.2 0.33
However the following command
dat - read.table(mydat.txt);
print(dat)
n1 - sum(as.matrix(dat$V1));
gives:
Error in sum(as.matrix(dat$V1)) : invalid 'type' (character) of argument
What's wrong with the data type so that
On Fri, 13 Mar 2009, Tal Galili wrote:
Thanks Thomas.
Assuming I want to change the k factor (used in AIC type procedures), is
there a way to do that ?
There is no k factor in the leaps algorithm. It always reports the best
model with one predictor, the best model with two predictors, the
Hi,
I wonder if the following is possible in R:
Suppose a function takes an argument, and wants to modify this argument
so that the change is visible _at the call side_. It would be what is
for example known as pass-by-reference-to-non-const in C++.
test - function(x)
{
x - 10
...
return
Thomas Mang thomas.mang at fiwi.at writes:
I wonder if the following is possible in R:
Suppose a function takes an argument, and wants to modify this argument
so that the change is visible _at the call side_. It would be what is
for example known as pass-by-reference-to-non-const in C++.
The package does not install under Windows: see
http://www.r-project.org/nosvn/R.check/r-release-windows-ix86/DPpackage-00check.html
The maisntainer has been informed (probably many times via the
automated notification system). With 1700 packages, the volunteers
have no time to spend
Debabrata Midya Debabrata.Midya at commerce.nsw.gov.au writes:
This has reference to the package âDPpackageâ. The binary version is
available on Mac OS, but I am using Windows XP.
May I request you to assist me in the followings:
How can I prepare Windows binary of DPpackage from
On Fri, 13 Mar 2009, Thomas Mang wrote:
Hi,
I wonder if the following is possible in R:
Suppose a function takes an argument, and wants to modify this argument so that the change is visible _at the call side_. It would be what is for
example known as pass-by-reference-to-non-const in C++.
Dieter Menne wrote:
Thomas Mang thomas.mang at fiwi.at writes:
I wonder if the following is possible in R:
Suppose a function takes an argument, and wants to modify this argument
so that the change is visible _at the call side_. It would be what is
for example known as
Do an 'str(dat)' and see what the structure is. When I read in your data I get:
x
V1V2 V3
1 AAA 100.0 1222.312
2 AAC 100.20.330
str(x)
'data.frame': 2 obs. of 3 variables:
$ V1: Factor w/ 2 levels AAA,AAC: 1 2
$ V2: num 100 100
$ V3: num 1222.31 0.33
Dear Paul,
Could you be more specific about what you mean here?
I don't know the Runger paper so it's hard to tell what it is that
you're looking for.
Blatant plug: I developed a package for hidden Markov models
called depmixS4 that in some sense does what you want: clustering
taking
Prof Brian Ripley ripley at stats.ox.ac.uk writes:
The maintainer has been informed (probably many times via the
automated notification system). With 1700 packages, the volunteers
have no time to spend correcting packages for non-responsive
maintainers (we do quite a lot for responsive
Hi,
I want to run the R-function ctree (package party) from Java over Rserve
with the following Java-Code:
try{
RConnection v = new RConnection();
v.voidEval(library(party));
v.voidEval(try(load(\C:\\Documents and Settings\\daten2.rda\)));
v.voidEval(try(pdf(\C:\\Documents and
Dear Emma,
Have you tried a simpler model? False convergence can be due to an
overcomplex model. Can you give a brief outline of your data? E.g. how
many sites, how many data per site, ... Cross tabulations of all pairs
of factor variables are usefull too.
HTH,
Thierry
Hi,
I am not sure which test is applied to the data if you use cor.test(x, y) ?
Is it an unpaired t-Test?
Regards
--
View this message in context:
http://www.nabble.com/cor.test%28x%2Cy%29-tp22492993p22492993.html
Sent from the R help mailing list archive at Nabble.com.
Hi Thierry,
Thanks, my data are pasted in below: n = 48, with different numbers if site
replicates.
Site passes length width height ohwidth ohheight style shape nogap pgaps
1 1 32 38.21 7.18 2.600.00 0.00 1 1 0 0.00
2 1 7 154.38 2.55 2.430.00
I think what you are missing is that the default map database is world.
If you use:
library(maps)
require(mapproj)
longlatLimit-c(-107,-93,40,52)
par(plt=c(0,1,0,1),cex=1,cex.main=1) #Set plotting parameters
map(regions=USA, projection=azequalarea,
Dear all,
This seems like a simple problem but i've searched the help files and tried
various options but failed, so apologies in advance for asking what i'm sure
is an easy thing to do!
In short, I have displayed behavioural data using the TraMineR package such
that there is a colour change
Hello,
I'm trying to put a dynamic table and a dynamic graph side by side in a pdf
document using Sweave.
The data.frame used to generate the table is called rg (rg.txt):
Date; Code; Data1; Data2
2009-03-10;1;1958;147
2009-03-10;2;302;144
2009-03-10;3;4;141
2009-03-10;4;4;144
Dear Emma,
First of all make shure that style and habitat are factors (assuming
that they are categorical).
glmer(passes~hvolume+style+habitat(1|Site),family = poisson)
Style has 3 levels, habitat 5 levels. So your model needs to estimate 1
parameter for hvolume, 2 for style, 4 for habitat and
Hello, everybody
Say I have
nm1 - c(rep(1,10), rep(0,10))
then I can do:
diff(nm1)
to see where I have shift in value
but what if I have
nm2 - c(rep(SPZ8, 10), rep(SPX9, 10))
how can I produce the same ouput as diff(nm1) does, that is zeros
everywhere except for one place where SPZ8 changes to
Sean Zhang wrote:
Dear Jens and Wacek:
I appreciate your answers very much.
I came up an example based on your comments.
I feel the example helped me to understand...(I could be missing your points
though :( )
If so, please let me know.
Simon pointed out the following link:
2009/3/13 Sergey Goriatchev serg...@gmail.com:
Say I have
nm1 - c(rep(1,10), rep(0,10))
then I can do:
diff(nm1)
to see where I have shift in value
but what if I have
nm2 - c(rep(SPZ8, 10), rep(SPX9, 10))
how can I produce the same ouput as diff(nm1) does, that is zeros
everywhere
Hi Thierry,
Thanks again! You are a great help!!
I have taken habitat out, and then run it with style but still the same
problem exists, so I have taken both style and habitat out. The problem
here is it leaves me with only 3 parameters and because they are all
correlated I cant use them in
Hi:
For A, you can use head and tail but you have to add a zero the front.
For B, you can use the same function, but put it inside an sapply and
run over the columns and then cbind it back with the original dataframe.
A)
nm2 - c(rep(SPZ8, 10), rep(SPX9, 10))
-1.0*c(0,as.numeric((head(nm2,-1)
==
Course: 1 day introduction to R and S-PLUS
Location: Basingstoke, UK
Date: Wednesday 29 April 2009
Cost: 500 GBP
==
Details:
SP411: An introduction to R and TIBCO Spotfire S-PLUS
This course will give an
Ptit_Bleu ptit_bleu at yahoo.fr writes:
I'm trying to put a dynamic table and a dynamic graph side by side in a pdf
document using Sweave.
The data.frame used to generate the table is called rg (rg.txt):
Date; Code; Data1; Data2
2009-03-10;1;1958;147
2009-03-10;2;302;144
...
The Sweave
Hi,
I have two lists of numbers which are both 1,2,3,4.
I would like to combine pairs so that I have:
1,2
1,3
1,4
2,3
2,4
3,4.
I know that expand.grid() can give me all combinations of pairs.
Any suggestions would be much appreciated.
Emma
--
View this message in context:
I have solved my problem using:
x-1:4
x
[1] 1 2 3 4
combn(x,2)
[,1] [,2] [,3] [,4] [,5] [,6]
[1,]111223
[2,]234344
Thanks Emma
emj83 wrote:
Hi,
I have two lists of numbers which are both 1,2,3,4.
I would like to combine pairs so
On Thu, Mar 12, 2009 at 01:25:40PM -0700, Atul Joshi wrote:
When I run my .r script using source (myfilename) from console the plots
appear.
However, when I execute the same file via terminal command line using R CMD
BATCH myfilename, the plots do not appear.
I am working with Mac.
Fabulous, guys!
Let me try your suggestions.
Thanks a lot!
Best,
SErgey
On Fri, Mar 13, 2009 at 11:53, markle...@verizon.net wrote:
Hi:
For A, you can use head and tail but you have to add a zero the front.
For B, you can use the same function, but put it inside an sapply and run
over the
Where do you want to print it? Is it the console (if so, try
'print(median)') or if it is the plot, use 'text' with the appropriate
parameters. It would help if you listed the I tried many things but
without success... and what you were expecting vs. what you got.
Reproducible code would be
Hi Kingsford,
Thanks for the reply - some of the sets/palettes in the RColorBrewer are
ideal, but the problem with the problem i have is that they only go up to 12
colours, and i need 15 colours - so i assume the only thing i can do is
create my own palette, but i'm having limited success in
I'm doing a permutation test and need to efficiently generate all
distinct subsets of size r from a set of size n. P 138 of MASS (4th
ed) notes that The code to generate this efficiently is in the
scripts. I was unable to find this code on quick inspection of the
\library\MASS\scripts file for
Dear all.
After much grief I have finally found the source of some weird
discrepancies in results generated using R. It turns out that this is
due to the way R handles multi-line expressions. Here is an example
with R version 2.8.1:
#
From: Christopher David Desjardins cddesjard...@gmail.com
To: r-help@r-project.org
Date: Thu, 12 Mar 2009 17:37:26 -0500
Subject: [R] Unable to run smoother in qplot() or ggplot() - complains about
knots
I get the following error when I run qplot()
qplot(grade, read,data = hhm.long.m,
One option for creating your own palette is
#install.packages('epitools')
mycols - colors.plot(locator = TRUE)
then left-click on 15 colors of your liking and then right-click 'Stop'.
mycols will be a data.frame with the third column containing the color names.
Kingsford
On Fri, Mar 13, 2009
This is a perfectly legal expression:
f - a
+ b
+ c;
Type it in a the console, and it will assign a to f and then print out
the values of b and c. In parsing 'f - a' that is a complete
expression. You may be confused since you think that semicolons
terminate an expression; that is not
On Fri, 13 Mar 2009, Paul Suckling wrote:
Dear all.
After much grief I have finally found the source of some weird
discrepancies in results generated using R. It turns out that this is
due to the way R handles multi-line expressions. Here is an example
with R version 2.8.1:
Did you read the help for cor.test? Test statistics, references
looks pretty complete to me. If the descriptions are too terse,
then the references given would be the next step.
Sarah
Excerpted from ?cor.test
If 'method' is 'pearson', the test statistic is based on
Pearson's
Many thanks yet again for your reply, thanks for that method, i gave it a go
and i checked 'mycols' and sure enough it had selected the chosen colours
and listed their names, but when i used it for making the graph warnigs
informed me that the supplied colour in not numeric or character.
Ross
Paul Suckling wrote:
...
# R-script...
r_parse_error - function ()
{
...
f - a
+ b
+ c;
}
...
f 1
As far as I am concerned f should have the value 3.
as
Thanks for the reply - some of the sets/palettes in the RColorBrewer are
ideal, but the problem with the problem i have is that they only go up to 12
colours, and i need 15 colours - so i assume the only thing i can do is
create my own palette, but i'm having limited success in trying to work
For permutations a couple of options are 'permutations' in package
gtools, and 'urnsamples' in package prob
hth,
Kingsford Jones
On Fri, Mar 13, 2009 at 6:35 AM, Dale Steele dale.w.ste...@gmail.com wrote:
I'm doing a permutation test and need to efficiently generate all
distinct subsets of
I get it. Thanks everyone for the feedback.
Now that I understand how it works, my comment would be that this
system is dangerous since it makes it difficult to read the code and
easy to make errors when typing it. I recognise that this is something
so fundamental that it is unlikely to be
Hi Oliver,
Thanks very much for your reply. I have tried your script, but when the
script for the graph runs it comes up with several error messages repeating
that 'supplied colour is not numeric or character'
Olivier Delaigue wrote:
library(colorRamps)
image(matrix(1:150, 10), col =
jim holtman wrote:
if (1 == 1) {print (TRUE)
+ } else {print (FALSE)}
[1] TRUE
so the parse knows that the initial 'if' is not complete on the single line.
... and likewise the original code could be rewritten as
f - { a
+ b
+ c }
vQ
If all your code has semicolons you could write a program that
puts each statement on one line based on the semicolons and
then passing it through R will reformat it in a standard way.
See Rtidy.bat in the batchfiles distribution for the reformatting part:
http://batchfiles.googlecode.com
On Fri,
On Thu, Mar 12, 2009 at 5:37 PM, Christopher David Desjardins
cddesjard...@gmail.com wrote:
I get the following error when I run qplot()
qplot(grade, read,data = hhm.long.m, geom = c(point, smooth))
Error in smooth.construct.cr.smooth.spec(object, data, knots) :
x has insufficient unique
On Fri, Mar 13, 2009 at 7:19 AM, Ross Culloch ross.cull...@dur.ac.uk wrote:
Many thanks yet again for your reply, thanks for that method, i gave it a go
and i checked 'mycols' and sure enough it had selected the chosen colours
and listed their names, but when i used it for making the graph
Hello Dieter,
And thank you for the corrections.
Concerning the point 3, I'm a bit lost. Is it a problem of place to put the
table and the graph side by side (my english is quite as low as my skills in
Latex) ?
I tried with \begin{minipage}{0.45\textwidth} instead of 0.7 and I put
//tiny but no
Hi Hadley,
Many thanks for your post. You're not wrong - i'm certainly finding it
challenging, but i assumed it was because i was making some basic errors. My
data are 15 types of behaviour, e.g. resting, alert, locomotion, etc. so i
need to use 15 colours to tell each appart in a barplot which
Hi Kingsford,
Thanks yet again for your help! I have tried this, and once again i have
failed! I have put the code that i've used below (i'm sure you'll note some
bad practice) if that is any use to help explain where i'm going wrong, it
seems to run fine and feeds back just what you noted it
Gabor Grothendieck wrote:
If all your code has semicolons you could write a program that
puts each statement on one line based on the semicolons and
then passing it through R will reformat it in a standard way.
See Rtidy.bat in the batchfiles distribution for the reformatting part:
On 13-Mar-09 12:55:35, Paul Suckling wrote:
Dear all.
After much grief I have finally found the source of some weird
discrepancies in results generated using R. It turns out that this is
due to the way R handles multi-line expressions. Here is an example
with R version 2.8.1:
On Fri, Mar 13, 2009 at 10:11 AM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Gabor Grothendieck wrote:
If all your code has semicolons you could write a program that
puts each statement on one line based on the semicolons and
then passing it through R will reformat it in a
I would argue that this is a matter of preference and the arguments on
principle for one side or another are not particularly compelling.
When the = was introduced for assignment, an argument was made that
name=value function arguments are also implicitly a kind of assignment.
While Duncan has
Gabor Grothendieck wrote:
On Fri, Mar 13, 2009 at 10:11 AM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Gabor Grothendieck wrote:
If all your code has semicolons you could write a program that
puts each statement on one line based on the semicolons and
then
Dear Ingmar,
Thank you for your reply, I hope I answer your question ---
A couple specific applications I have in mind:
* We work with customers to reduce energy consumption from use of hot
water. Baseline data was gathered at several locations by attaching a
temperature sensor downstream from
Alan Zaslavsky wrote:
I would argue that this is a matter of preference and the arguments on
principle for one side or another are not particularly compelling.
indeed; i have argued (i think...) for treating them as equals, the
vhoice being a matter of taste.
When the = was introduced for
I am trying to update the packages that I have installed but I get the
following warning messages:
package 'tseries' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'tseries'
bundle 'forecasting' successfully unpacked and MD5 sums checked
Warning:
If your subsets are to be taken from the rows of a dataframe, df, and
the size is r, then something like this could satisfy:
apply(combn(nrow(df), r), 2, function(x) df[x, ])
(Although these are not really permutations as I understand that term.)
--
David Winsemius
On Mar 13, 2009, at 8:35
Maybe they are loaded, use search() to see if they are. If yes, then
use detach() to unload them first.
Best
2009/3/13 rkevinbur...@charter.net:
I am trying to update the packages that I have installed but I get the
following warning messages:
package 'tseries' successfully unpacked and
thanks for your supportive comments!
by that time r programs will be scanned directly from your head, i
suppose, and the intelligent scanner will as gladly take - as it will
=, so the problem will rather vanish.
Yes, and maybe the scanner will be more intelligent than the programmer so
when
Hii Jholtman,
I will make a graph of the median values and not to print to the console.
I tried to plot with:
plot(V3 ~ grup, data = median) ??
but I get an error message.
I also tried to print the output of median-with(x, tapply(V3, grup,
median)) to a text file with the X and Y Koordinates
library(ROCR)
library(randomForest)
plot(results,significant)
Error in as.double(x) :
cannot coerce type 'S4' to vector of type 'double'
After try with all the possibilities, it shows same error in simpleaffy data
plot for the results.
please someone guide me
wiener30 wrote:
I am
Hii,
I will save the elements of the vector median-with(x, tapply(V3, grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
400 425 450 475 500
17.8 17.8 17.5 17.8 17.7 17.6 17.7 17.6 17.8 17.7 17.6 17.7 17.8 17.7 17.8
library(colorRamps)
image(matrix(1:150, 10), col = blue2green2red(15))
Regards,
Olivier Delaigue
Ross Culloch wrote:
Dear all,
This seems like a simple problem but i've searched the help files and
tried various options but failed, so apologies in advance for asking what
i'm sure is
Sergey,
Sorry I missed your post earlier. I had this same problem and I reinstalled
the DDE Server and Excel Add-In, rebooted and it fixed it. I thought they were
already installed as I could pull down data in Excel from Bloomberg, but
reinstalling them fixed my R problem. You can find the
Can you provide a reproducible example with the data so that we
understand what you are working with. Need to see what the structure
of 'x' and 'median' are.
On Fri, Mar 13, 2009 at 8:35 AM, johnhj jhar...@web.de wrote:
Hii Jholtman,
I will make a graph of the median values and not to print
'str(x)' would help. I assume that this is a named list, so this
might plot it for you:
plot(names(x), x)
On Fri, Mar 13, 2009 at 10:59 AM, johnhj jhar...@web.de wrote:
Hii,
I will save the elements of the vector median-with(x, tapply(V3, grup,
median)). The output of this vector is:
25
Hi,
take a look to
?write.table
regards
2009/3/13 johnhj jhar...@web.de
Hii,
I will save the elements of the vector median-with(x, tapply(V3, grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
400 425 450 475
Ptit_Bleu ptit_bleu at yahoo.fr writes:
Concerning the point 3, I'm a bit lost. Is it a problem of place to put the
table and the graph side by side (my english is quite as low as my skills in
Latex) ?
I tried with \begin{minipage}{0.45\textwidth} instead of 0.7 and I put
//tiny but no
?cat
On Mar 13, 2009, at 10:59 AM, johnhj wrote:
Hii,
I will save the elements of the vector median-with(x, tapply(V3,
grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350
375
400 425 450 475 500
17.8 17.8 17.5 17.8
Hi, Kent
Thank you for that!
I'll pass the info to our systems administrator, he is the only one
who is allowed to do things like that.
Have a nice weekend!
Best,
Serge
On Fri, Mar 13, 2009 at 15:32, Voss, Kent vo...@kochind.com wrote:
Sergey,
Sorry I missed your post earlier. I had this
I did similar things with polygon().
Le mar. 10 mars à 13:30, g...@ucalgary.ca a écrit :
For a given random variable rv, for instance, rv = rnorm(1000),
I plot its density curve and calculate some quantiles:
plot(density(rv))
P10P50P90 = = quantile(rv,probs = c(10,50,90)/100)
I would like to
Thanks Dieter for the link.
In fact it may be a problem with R.
The .tex created with R for the table put \begin{table}[ht] and \end{table}\
between \begin{minipage} and \end{minipage} (see below)
If I manually change these positions, according to your link, there is no
more error ... but the
This may be somewhat useful, but I might have more later.
http://florence.acadiau.ca/collab/hugh_public/index.php?title=R:CheckBinFit
(the code below is copied from the URL above)
CheckBinFit - function(y,phat,nq=20,new=T,...) {
if(is.factor(y)) y - as.double(y)
y - y-mean(y)
y[y0] -
Hi, sorry if it is a too stupid question, but how do I a string search
in R:
I have a dataframe A with A$test like:
test1
bcdtestblabla2.1bla
cdtestblablabla3.88blabla
and I want to search for string that start with 'dtest' and ends with
number and return the location of that substring and
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
Hi Alexis,
In my opinion you are nothing short of genius! That worked a treat, i
thought it would be something simple, but i could not find the script or an
example anywhere!!!
That was a massive help and has salvaged my day! :clap:
Thanks very much to everyone else that helped, it was much
Yes, a random variable, discrete or continuous one, should associate with
a probability space and a measurable space.
I thought that graph of density(rv) below could give us an example of a
density function. I am very sorry for confusing you.
My question is how to find/estimate maximum values of
This is a simple question, but I'm going on the supposition that the
only stupid question is the one not asked.
1. I have many sets of 5 proportions that are different from each
other (prop.test), and want to know which proportions are different
from each other. In other words, I want
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
Ok, sorry...
here is my code so far...
x -read.table(file=D:/output.txt)
x$grup - 25*rep(1:144, each=5)
median-with(x, tapply(V3, grup, median))
sd-with(x, tapply(V3, grup, sd))
I will plot to types of graph. One graph with the median values for example
with the plot() function, the
Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
thanks in advance for enlightening me). I need to sort each row of a matrix
independent of the others. For example,
test - matrix(c(8,7,1,2,6,5,9,4,3),nrow=3)
test
[,1] [,2] [,3]
[1,]829
[2,]76
Dear:
I am trying to plot x against y for a particular subset of data, say z=1,
and labelling data by another variable say, k.
My data are:
y-c(69.7, 82.3, 66.3, 107.3, 90.1, 63.7, 82, 74.4, 61.7, 93.4,
73.4, NA, NA, 70.7, 67.7, NA, NA)
x-c(71.2, 82.6, 67.4, 107.1, 90.5, 66.7, 83.9, 73.9, 61,
Thank you all,
I did it with write.table...
greetings,
johnh
johnhj wrote:
Hii,
I will save the elements of the vector median-with(x, tapply(V3, grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
400 425
If you are trying to build your own function then presumably you do
not want the global maximum, since that is trivially returned by max.
So what do you really want? Is this a programming question or just a
general statistics question?
If you want to search along a (specific) sequence for
On 3/13/2009 12:07 PM, Ptit_Bleu wrote:
Thanks Dieter for the link.
In fact it may be a problem with R.
The .tex created with R for the table put \begin{table}[ht] and \end{table}\
between \begin{minipage} and \end{minipage} (see below)
If I manually change these positions, according to your
Kevski wrote:
Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
thanks in advance for enlightening me). I need to sort each row of a matrix
independent of the others. For example,
apply(matrix, 1, sort)
vQ
__
Now I just need the resulting matrix:
2 8 9
4 6 7
1 3 5
On Mar 13, 2009, at 1:26 PM, Wacek Kusnierczyk wrote:
Kevski wrote:
Oh, this seemed so simple (and I'm sure the answer will be, as
usual, so
thanks in advance for enlightening me). I need to sort each row of
a matrix
independent
On Fri, Mar 13, 2009 at 5:26 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
thanks in advance for enlightening me). I need to sort each row of a matrix
independent of the others. For example,
Thanks for your ideas.
I would like to find all possible maximums - mountains on a graph of a
given density function but I have no ideas. In calculus, there is a
general approach for a given function f(x): Find derivative of f(x) and
estimate all zeros of f'(x). These zeros give us locations of
Got the answer:
t(apply(test,1,sort))
I had played with the apply fn at one point, but noticed the results were
not quite right. Wrapping it in t was the trick! Thanks!
Now to use the nicely sorted rows in my real problem at hand...
Cheers,
Kev-
--
View this message in context:
Try this. We use regexpr to get the positions and
strapply puts the values in list s. The unlist statement
converts NULL to NA and simplifies the list, s, to a
numeric vector. For more info on strapply see
http://gsubfn.googlecode.com
library(gsubfn) # strapply
x - ctest1,
In discrete math, first differences are the analogues of first
derivatives and second differences are the analogues of second
derivatives. (I thought I learned this in Knuth, vol 1 25 years ago,
but I cannot find it, so maybe it was in some the time series stuff I
read 20 years ago). So
1 - 100 of 139 matches
Mail list logo