On Mon, 2008-04-07 at 15:13 +0900, Tribo Laboy wrote:
> Hello,
>
> I am new useR, I have written some functions, which I currently use by
> "source"-ing them from the files.
> That's OK, but when I my functions start counting in the tens and
> hundreds I'd be glad to be able to type
> "help.search
Hi R-users,
I have this code below for tweedie inverse, but I don’t understand why it
doesn’t give zero for some of r1 values?
r1 <- runif(31,0,1)
p0 <- 0.72 ; p <- 1.63; mu <- 1.48; phi <- 9.61
tweedie.inv <- function(rand,p0,p,mu,phi)
{ y <- rand
ind <- rand < p0
y[ind] <- 0
y[!ind
Though R is indeed cross-platform language, how to build depends on the
environment. This is case for most cross-platform software, library,
etc. Basically cross-platform means cross-platform for users.
When you build packages, you are not user but developer.
Rtools will help you.
http://www.mur
If this is a large dataset, you probably do not want the covariance matrix
but some decomposition of it. What are you intending to do with it?
If you look at the code for MASS:::lda.default you will see how
discriminant analysis can be done more stably without ever computing the
covarinace mat
Hello,
I am new useR, I have written some functions, which I currently use by
"source"-ing them from the files.
That's OK, but when I my functions start counting in the tens and
hundreds I'd be glad to be able to type
"help.search("my_obscure_fun")" and get a sensible reply. I also want
to be able
Hi
Is anyone aware if there is a function already available that calculates the
between-groups COvariance matrix, say in a discriminant analysis setting, or in
a manova setting.
Maybe as a helper function to some other major function.
Otherwise I would have to program it myself (probably resulti
try
hist(foo[,5])
plot(foo[,c(1,5)])
HTH
> Currently I invoke:
>
> foo <- read.table("foo.data", header=TRUE)
>
> to read a table into foo
>
> Then when I try to plot a histogram out of the 5th column of foo:
>
> hist(foo[5])
>
> It fails and it says:
>
> Error in hist.default(foo[5]) : '
Currently I invoke:
foo <- read.table("foo.data", header=TRUE)
to read a table into foo
Then when I try to plot a histogram out of the 5th column of foo:
hist(foo[5])
It fails and it says:
Error in hist.default(foo[5]) : 'x' must be numeric
Then I tried:
>typeof(foo[5])
[1] "List"
So how c
François Aucoin wrote:
> I want to include a vignette with a package I wrote. I did follow the
> "Writting R extentions" document step by step, but went I run "Rcmd build",
> an error occurs. It goes like this:
>
> "
> * creating vignettes ... ERROR
> .
> .
> .
> .
> :7: Emergency stop
> L7L ==>
Leyla Biondini wrote:
> I have installed "Package: r-cran-urca (1.1-6-1) [universe]" from the ubuntu
> website for use in Windows.
>
Whatever made you believe that that would work?
If you are using Windows, just install urca via the Packages menu in the
Rgui.
--
O__ Peter Dalgaard
I want to include a vignette with a package I wrote. I did follow the
"Writting R extentions" document step by step, but went I run "Rcmd build",
an error occurs. It goes like this:
"
* creating vignettes ... ERROR
.
.
.
.
:7: Emergency stop
L7L ==> Fatal error occurred, no output PDF file prod
Thanks, I'm not sure why it wasn't saved as a .csv. I posted it to the R
Mac list and the general R list because in the past when I've posted to the
R Mac list I was told it wasn't a R question. Because this problem didn't
appear with the windows verson of R, I wasn't sure which
David Kaplan wrote:
>Yea, I checked that, but that wasn't the problem. I'm sending the input
> and
>a much smaller file. It's in .csv format. The input is for the Mac, and
>I'm beginning to think it might be a Mac issue. The program input lines
>come from John Fox's program sem
Don't use telnet, use rsh or (better) ssh. You can set up your identity on the
remote host so that ssh doesn't ask for your password (see ssh
documentation), and you can give ssh the command(s) that should be executed
on the remote host (again see ssh documentation).
Claus
On Sunday 06 April
Dear Edwin,
On Mon, 7 Apr 2008 01:14:35 +0100
Edwin Sendjaja <[EMAIL PROTECTED]> wrote:
>
> Dear John,
>
> Thank you.
>
> Is there any possibility to get original stored number printed.
R is a programming language, so you could in principle read an input
line as character data, break it into
On 6 April 2008 at 23:58, (Ted Harding) wrote:
| Hi Folks,
| A while ago (September 2007) I set up an experimental
| Debian 4.0 Etch installation, and installed R on it,
| along with several packages -- including e1071 and
| the "Bundle" VR -- by means of the Debian package
| manager. Most of the
The documentation for predict.gam in library mgcv gives an example of using
an "lpmatrix" to do approximate prediction via interpolation. However, the
code is specific to the example wrt the number of smooth terms, df's for
each,etc. (which is entirely appropriate for an example)
Has anyone gene
Dear John,
Thank you.
Is there any possibility to get original stored number printed.
Because i have another coloum like:
Protocol
"TCP"
This is gonna cause probleme (as you notice before).
I dont really understand what you mean with a list. i am new with R.
Thanks,
Edwin
Am Sonntag,
Thank you Matthieu for your helpful suggestions.
Unfortunately I still have problems.
I have tried to compile it via your suggestion.
"
this is strange... you should have the usual summary...
I have on my machine
library(urca)
test2<-ur.df(nottem, type="none", lags=1)
summary(test2)
"
When I type
David Kaplan wrote:
>Hi all,
>I'm running the program sem on a Mac, but I'm getting a message that I
> think
>is quite general. The error reads
>Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
>:
> scan() expected 'a real', got '10652)'
>The
There may well be neater ways to do this, but if you have only a
limited number of zeros in any run, this is probably as quick as
any. Suppose your data frame is 'dat':
> fixCol <- function(x) {
y <- x
n <- length(x)
while(any(zx <- x == 0)) {
y <- c(NA, y[-n])
Dear Steven,
The prob package does this, too. (Please see the * fix below).
x <- c(0, 0, 1, 2, 2)
library(prob)
A <- permsn(x, 5) # with repeated columns
B <- unique( data.frame( t(A) )) # no repeated rows
The data frame B will have 56 rows and 5 columns. If you need the
Colleagues
I am working in a Linux OS with R 2.6.2.
I need to execute a telnet session to another Linux machine from R,
perform some operations, then return to the original computer. When I
am in an R session, this is easy to accomplish by typing:
system("telnet -l username machinena
Hi Folks,
A while ago (September 2007) I set up an experimental
Debian 4.0 Etch installation, and installed R on it,
along with several packages -- including e1071 and
the "Bundle" VR -- by means of the Debian package
manager. Most of the time, R works fine. But not always.
Just now, I wanted to t
Hi all,
I'm running the program sem on a Mac, but I'm getting a message that I think
is quite general. The error reads
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
:
scan() expected 'a real', got '10652)'
The 10652 is the sample size coming fro
Hi,
If I understand you correctly, there is beta code within the development
version of package 'vegan' on R forge to do this.
install.packages("vegan", repos="http://R-Forge.R-project.org";)
Then:
> numPerms(5)
[1] 120
> perms <- allPerms(5, observed = TRUE)
> perms[1:10,]
[,1] [,2] [,3]
Le dim. 6 avr. à 14:44, Dirk Eddelbuettel a écrit :
>
> On 6 April 2008 at 10:40, Dirk Eddelbuettel wrote:
> | Using Latex and the beamer class, I would like to highlight code
> snippets.
> | Does anybody know a suitable 'preprocessor' or 'filter' for R (and/
> or C/C++)
> | code ?
> |
> | I hav
You may be interested in the heplots package for multivariate linear
models. For a multivariate regression, it plots a data ellipse of the
predicted values (H matrix) together with a data ellipse of the
residuals (E ellipse). H is scaled so that it protrudes outside the E
ellipse iff the hypothe
Hi Charles,
Charles C. Berry wrote:
> Try this:
>
> f2 <- function(...) sapply( substitute(list(...)), deparse )[-1]
Wow, this works. Thanks a lot!
> p.s. Why do you want this as mode "character"?
For the usual purpose of 'substitute': to label something. The use case
is that I have a
You can use the function permutation from the e1071 package,
then
library(e1071)
multisetperm <- function(multiset) {
unique(apply(matrix(multiset[permutations(length(multiset))],
ncol=length(multiset)), 1, paste, sep="", collapse="")) }
multisetperm(c("0", "0", "1", "2", "2"))
> The output wo
Dear R users,
I want to perform an exact permutation of multisets. I have looked at the
coin package, but it doesn't seem to offer what I am looking for. I want to
perform permutations (exact - without duplications) on multisets of scalars
(e.g., the multiset 0,0,1,2,2). I want to output all the
Dear Edwin,
There's a distinction between the way in which a number is stored
internally and the way in which it's printed. R is reading the hex
numbers correctly but is printing them in decimal. You can assign the
class "hexmode" to the vector containing the data and then it will
print in hex:
>
Hello,
I have a data with hexdecimal. But GNU R convert it to strange number. How can
I get that hexdecimal showing in the R-table?
-
My Data-Table:
Sender_ID Receiver_ID Other_ID
6565 0x477
On Sun, 6 Apr 2008, Simon Anders wrote:
> Hi,
>
> is there an elegant way to use 'substitute' with '...' arguments?
>
> My first try was this:
>
> > f1 <- function(...) substitute(...)
> > f1( 2+7, "foo", 3+5 )
> 2 + 7
>
> As you can see, substitute acts only on the first argument. So I tried
>
>
On Apr 6, 2008, at 10:35 AM, Ben Bolker wrote:
> csiro.au> writes:
>
>>
>> I've noticed an increasing tendency for people to use '=' rather than
>> the older '<-' symbol. When '=' became available as an assignment
>> operator in S-PLUS in the late '90s my first reaction was to
>> switch to
>>
Hi Grant,
Grant Gillis wrote:
> My problem is:
>
> I have a data set for individuals (rows) and values for behaviours
> (columns). I would like to know the proportion of shared behaviours for all
> possible pairs of individuals. The sum of shared behaviours divided by the
> total. There are ze
Hello,
I have a data with hexdecimal. But GNU R convert it to strange number. How
can I get that hexdecimal showing in the R-table?
---
-- My Data-Table:
Sender_ID Receiver_ID Other_ID
6565 0x47
I would greatly appreciate if anybody can tell me if an R code is available for
computing the eta measure of association in contingency tables.
With regards
-
[[alternative HTML version deleted]]
__
R
On 6 April 2008 at 10:40, Dirk Eddelbuettel wrote:
| Using Latex and the beamer class, I would like to highlight code snippets.
| Does anybody know a suitable 'preprocessor' or 'filter' for R (and/or C/C++)
| code ?
|
| I have been including it in simple \begin{verbatim} ... \end{verbatim} and I
csiro.au> writes:
>
> Here is a demo you may like to consider. (I can see what you are trying
> to do with your loops, but I prefer to do it this way.)
This is just for pedagogical purpose,
so I like to keep the simple-minded 'for'
loop.
But what I really wonder is why do I not get the right
Hi,
is there an elegant way to use 'substitute' with '...' arguments?
My first try was this:
> f1 <- function(...) substitute(...)
> f1( 2+7, "foo", 3+5 )
2 + 7
As you can see, substitute acts only on the first argument. So I tried
> f2 <- function(...) substitute(list(...))
> f2( 2+7, "f
Hello all and thanks in advance for any advice.
I am very new to R and have searched my question but have not come up with
anything quite like what I would like to do.
My problem is:
I have a data set for individuals (rows) and values for behaviours
(columns). I would like to know the proportion
On 06/04/2008 11:40 AM, Dirk Eddelbuettel wrote:
> Using Latex and the beamer class, I would like to highlight code snippets.
> Does anybody know a suitable 'preprocessor' or 'filter' for R (and/or C/C++)
> code ?
>
> I have been including it in simple \begin{verbatim} ... \end{verbatim} and I
> k
Cristian Carranza wrote:
> Hi!
>
> I am an R beginer, so perhaps this is a quite simple question...
> After using the lmer command (under the lme4 package) for fitting a mixed
> model, it was impossible to use de command plot(model) for checking model
> adequacy. R returns this message: "Erro
On Sun, Apr 6, 2008 at 9:04 AM, saikat sarkar <[EMAIL PROTECTED]> wrote:
> This is the 2nd time in the chat room. Its a great place to get help from R
> experts.
I assume you are referring to this email list. I am not aware of
a chat room but if it exists that is something different from this
li
Hi!
I am an R beginer, so perhaps this is a quite simple question...
After using the lmer command (under the lme4 package) for fitting a mixed
model, it was impossible to use de command plot(model) for checking model
adequacy. R returns this message: "Error in as.double(y) : cannot type '%s'
c
Using Latex and the beamer class, I would like to highlight code snippets.
Does anybody know a suitable 'preprocessor' or 'filter' for R (and/or C/C++)
code ?
I have been including it in simple \begin{verbatim} ... \end{verbatim} and I
know there is a better way -- in fact I saw it used a while b
Need idiot's guide to installing R on Mac 10.3.9.
Thanks.
BJ
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal,
try to use method "L-BFGS-B" and give boudary condition to the parameters in
use so that the algorithm search is limited to a particular region as it
seems u have to many parameters.
On Fri, 4 Apr 2008 22:10:20 -0700 (PDT) kathie wrote:
>
> Dear R users,
>
> I used to "OPT
csiro.au> writes:
>
> I've noticed an increasing tendency for people to use '=' rather than
> the older '<-' symbol. When '=' became available as an assignment
> operator in S-PLUS in the late '90s my first reaction was to switch to
> it as well. Brian Ripley warned me that it was not a good
> MORE GENERAL OPTIM ISSUES
>
> I'm considering creating a package 'optimMLE' that would automate
> some of this and package it with common 'methods' that would assume that
> sum(fn(...)) was either a log(likelihood) or the negative of a
> log(likelihood), etc. However, before I do, I ne
Hi,
It's more a vector question. Try this one:
> f
function( x, test = is.na(x) | x == 0 ){
out <- x[!test][ cumsum(!test) ]
if(test[1]) out <- c(NA,out)
out
}
> f( c(1,0,2,1,0) )
[1] 1 1 2 1 1
> f( c(1,0,2,1,0, NA) ) # missing values are also replaced
[1] 1 1 2 1 1 1
> f( c(0,1,0,2
Dear R Experts,
This is the 2nd time in the chat room. Its a great place to get help from R
experts.
I have a data frame problem, it contains thousands of data.
part of it, I am giving for explaining the problem
date day x yz
82 1989-04-28 Fri 2118.0 2418.80 33713
Oops! Sorry! Accept my apologies. I've sent this message to the wrong list.
Best regards,
Ricardo
[Ricardo Rodriguez] Your XEN ICT Team wrote:
> Those are good news.
>
> Prof Brian Ripley wrote:
>
>> You didn't tell us the version of R. quartz() is different in 2.7.0
>> alpha, and there the
Those are good news.
Prof Brian Ripley wrote:
> You didn't tell us the version of R. quartz() is different in 2.7.0
> alpha, and there the function arguments do work (and the size is
> really as advertised and not at a notional 72dpi). In fact, it is a
> much more standard device and interfac
Dear Spencer Graves,
Thank you for your comments and suggestions.
I knew that the true optimum values are about (0.69, 0.0, 0.0, -0.3, 0.3,
2.3, -3.0 ,-3.0). That's why I used these values as starting values.
Nonetheless, the last three estimates are so bad.
Regards,
Kathryn Lord
Spence
Yes, it does mean you can only get one kind of test at a time.
If you want more than one kind of test, you have to do it separately.
The simplest way to do this is probably something like this:
M_obj <- manova(cbind(y1, y2) ~ z1, data = ex7.8)
for(test in c("Wilks", "Roy", "Pillai"))
pri
I've noticed an increasing tendency for people to use '=' rather than
the older '<-' symbol. When '=' became available as an assignment
operator in S-PLUS in the late '90s my first reaction was to switch to
it as well. Brian Ripley warned me that it was not a good idea. As
usual he was right, bu
58 matches
Mail list logo