Displaying 20 results from an estimated 600 matches similar to: "ordering in dotplot"
2007 Jan 19
2
combn implementation
Hi,
I was checking the source code to the function combn that "generates
all combinations of the elements of 'x' taken 'm' at a time.",
because I wished to modify it. I have a doubt about a statement.
This is the main loop.
._1 <- 1:1
nmmp1 <- n - m + ._1
while (a[1] != nmmp1) {
if (e < n - h) {
h <- ._1
e <-
2004 May 03
2
adding a method to the dist function
Hi all,
I'd like to add the Bhattacharyya method to the dist function.
What is the best way to do this? I'm using R 1.9.0 and I was looking
for the code that defines the already existing distances, but I didn't
manage. As far as I understand, dist is defined in mva that is part
of the stats package now, but where is the code?
Thank you very much,
Giampiero
2004 Jan 16
2
reference to objects
Hi,
is there a way to reference to a data object without copying it?
For example I have a huge matrix called dist and I want two objects
obj1 and obj2 to have a memeber dist that points to the matrix, but
I don't want, for memory reasons, to copy the matrix twice.
As far as I understand the following code will generate three copies
of my data:
dist <- some_code_that_generates_data
2002 Jun 14
1
data.frame - transform
Hi there,
I have a data.frame (pwt6) which I would like to transform:
country year gdp
MEX 1950 2
MEX 1951 5
BOL 1950 4
BOL 1951 12
ITA 1950 45
ITA 1951 2
This should be the result:
year MEX.gdp BOL.gdp ITA.gdp
1950 2 4 45
1951 5 12 2
Right now I have this code (better - no code):
country.label<-names(table(pwt6$country))
result<-data.frame(year=NULL)
for(i in country.label)
?
2006 Jul 07
1
convert ms() to optim()
How to convert the following ms() in Splus to Optim in R? The "Calc" function is also attached.
ms(~ Calc(a.init, B, v, off, d, P.a, lambda.a, P.y, lambda.y,
10^(-8), FALSE, 20, TRUE)$Bic,
start = list(lambda.a = 0.5, lambda.y = 240),
control = list(maxiter = 10, tol = 0.1))
Calc <- function(A.INIT., X., V., OFF., D.,
P1., LAMBDA1., P2., LAMBDA2.,
TOL., MONITOR.,
2006 Feb 14
3
Inf values in a matrix
Hello,
I have some Inf values in a matrix, but I don't want to replace them with
some value but rather remove the rows that contain the Inf values. Also I
would like to record the rows which were removed. Is there an easy way to
do this instead of writing loops over the matrix? Thanks.
Ita Cirovic Donev
2007 Nov 28
1
Order observations in a dataframe
Dear All,
Suppose I have the following dataframe:
country;weight;group
bul;10;1
cze;12;1
grc;12;1
hun;12;1
prt;12;1
rom14;1
fra;29;2
ita;29;2
gbr;29;2
aut;10;3
bel;12;3
The "group" variable denotes the id-number of a group of countries. How can
I re-label the groups in the descending order of their cumulative "weight",
which wound be:
country;weight;group
fra;29;1
ita;29;1
2005 Dec 23
2
for loop error
I have the following code and I am not sure what's wrong or how to make it
work.
B <- matrix(1,nrow=50,ncol=2)
for (i in 1:length(size.out)){ # length(size.out=2) these
are the two variables
X <- var.range[i,1] # min
Y <- var.range[i,1] # min
ratio <- size.out[,i]
for (j in 1:groups)
2017 Sep 07
0
ISO3 code to 7 continents names
> On Sep 7, 2017, at 12:21 PM, Miluji Sb <milujisb at gmail.com> wrote:
>
> df is a data frame consisting of one variable (iso3 codes) such as
>
> USA
> RUS
> ARG
> BGD
> ITA
> FRA
>
>
> Some of these iso3 codes are repeated and I would like the corresponding continent name, the countrycode package does not seem to distinguish between North and
2003 Oct 17
1
correlation matrix in Hmisc
Dear all,
I am trying to compute a matrix of Pearson's `r' or Spearman's `rho'
rank correlation coefficients using rcorr (Hmisc) the following way:
> mx<-rcorr(x, type="spearman")[1]
but then ...
> is.matrix(mx)
[1] FALSE
Even if I use as.matrix the result is not better.
What can I do?
Thank you all
Luca
2012 Apr 22
10
Assignment problems
The text below is a part of, some work I have to do, which is due in 2 days
and I am strung up with a lot of other stuff, so I was hoping someone would
take 5 mins and help me ??
Here is a part of my data.frame:
year country1 country2 contig comlang pop1 gdp1
pop2 gdp2 rta dist avgflow
1 1992 AUS AUT 0 0 17.4950008 321708.281
2017 Sep 07
2
ISO3 code to 7 continents names
df is a data frame consisting of one variable (iso3 codes) such as
USA
RUS
ARG
BGD
ITA
FRA
Some of these iso3 codes are repeated and I would like the corresponding
continent name, the countrycode package does not seem to distinguish
between North and South America. Thanks.
Sincerely,
Milu
On Thu, Sep 7, 2017 at 9:00 PM, David Winsemius <dwinsemius at comcast.net>
wrote:
>
> >
2006 Apr 14
0
Bluetooth (chan_btp): dialing external phone number through BTP/Zap when bluetooth device not present?
I sent the following message a few days ago, but never received a
reply, so I thought I'd ask again..
Can anyone tell me how me to get asterisk to dial out a phone number using BTP
when a bluetooth device is not detected? I can get BTP to dial to a
SIP phone, but I can't get it to dial through a POTS phone line using
the Zap interface..
I've tried putting the following under the
2007 May 16
2
Anyone Installed a Digium TE110P or TE120P card in Canada?
The Telco in Canada is been real painful. I was wondering if anyone has
installed a Digium TE1X0P card in Canada and if their Telco was so
difficult.
The Telco will not provide us a service until they see a FCC or DOC
number for the equipment ware are connecting to their service.
If have found "FCC Part 68, ANSI/ITA-968-A, Including Amendment A1 and
A2 Industry Canada CS-03"
2017 Jun 07
2
Help with Elite 800VA usb UPS
Hi, I have tried several drivers for make my Elite UPS working.
With blazer_usb I can contact it, but I have no informations. This is the
best result.
OS: Ubuntu Xenial 16.04.2 LTS
NUT Version: Nut 2.7.2-4Ubuntu1 (Installed from Ubuntu Software Center)
Device name: Elite UPS 800VA (http://www.elit-ups.com/ita/pro_ups.html,
discontinued) I can provider their *not working* linux monitoring tool
2006 Feb 25
1
More on our TODO lit
Hi!
We have a couple more things on our TODO list, it seems... (If we could use the
BTS tracking things would be better) (or we could use the issue tracker on
alioth, for now)
1. xen-utils:
Right now domains get shut down on upgrade... This is ok in a 2.0 -> 3.0
scenario, but it's not in a 3.0.1 -> 3.0.2, where we could avoid that,
probably! Should we perhaps try to avoid that,
2004 Mar 19
3
how to fix a factor
Hi all,
I created a data frame with three factors, plus the response that
looks like this:
x1 x2 x3 y
a 1 1 0.3
a 2 1 0.1
b 1 1 0.4
c 4 3 0.1
...
I would like to analise the effect of two of them, keeping the third fixed
(I already know the effect of the last). The reason why I don't create several
data frames for each value of the thirs factor is simply convenience (I'd like
to be able
2006 Apr 20
0
does anyone know anything about chan_btp or btpd?
I've tried posting a simple message twice, regarding using chan_btp to
dial a phone number through a Zap interface, but I've received no
answers, and I can't seem to figure out how to do what I want (which
seems to be a pretty typical use of chan_btp - I mean, isn't it used
to dial peoples' phone numbers when their bluetooth device is not
present?). I was wondering if anyone
2006 Dec 13
2
Phonetic symbols (IPA) in R graphics
Hi all,
I would like to add phonetic symbols in my figures. Usually I typeset
my documents in LaTeX and I use the tipa [1] package to get
International Phonetic Alphabet (IPA) fonts. So, my problem would be
solved if I could insert LaTeX commands in the text() function (I
guess at least).
I would like to avoid using psfrag (that is, inserting a string in
the eps figure and then substituting it
2007 Feb 28
1
adding graphics after dev.copy
Hi,
I am trying to create a plot and save it as pdf to the file
file1.pdf, then add some details and save the new plot as file2.pdf.
I would like to avoid repeating all the instructions needed to create
file1.pdf when I create file2.pdf.
This is what I have tried:
pdf(file="file1.pdf")
plot(1:10)
dev.copy(pdf,file="file2.pdf")
points(2,3)
dev.off()
dev.off()
When I run