Displaying 20 results from an estimated 10000 matches similar to: "replacing values in vector"
2004 Sep 22
5
Dear Any,
Is there a fonction in R to change a string to uppercase ?
Thanks for all your help
2004 Aug 26
5
GLMM
I am trying to use the LME package to run a multilevel logistic model
using the following code:
------------------------------------------------------------------------
-------------------------------------------
Model1 = GLMM(WEAP ~ TSRAT2 , random = ~1 | GROUP , family = binomial,
na.action = na.omit )
------------------------------------------------------------------------
2004 Jul 19
5
converting character strings to eval
Hi there fellow R-users,
I'm stuck on this seemingly trivial problem.
All I want to coerce a character string into a command.
For example:
x<-rnorm(20)
y<-rnorm(20)
str<-"lm(y~x)"
I want to evaluate the "str" command.
I have tried
eval(as.expression(str))
But it doesn't seem to work. I am aware of the call command, but for
reasons I won't go
2004 Sep 28
4
An index of all possible combinations of variables in a data fram e
Hello list
Does anybody know of any way to create an index of all the possible
combinations of variables (factors) in a data frame? ie for 3 factors A, B &
C we have
A
B
C
AB
AC
BC
ABC
which equates to columns 1, 2, 3, 1:2, (1,3), 2:3 and 1:3.
I realise that a function like model.matrix does this, but how to get the
seqence of the index?
Any help would be greatly appreciated.
2004 Sep 13
1
R and perl on solaris
Dear all,
I am developing a GUI in perl-Tk and I would use R engine to make some analysis
and some plots.
I have seen that the package RSPerl allows R from perl exchanges but this
package is developed on and for intel based computers.
When I try to install the package on solaris I have some errors
has somebody already used RSPerl on solaris ?
Many thanks,
Patrick
2004 Oct 22
1
Vector and String
Hi everybody,
I'm using a vector to strore some strings.
I create a vector named seq2 :
> seq2<-vector(length=0)
I have a string named b
> b
[1] CATGGTAGGAATAC
I put b in the vector
> seq2<-c(seq2,b)
Finally I edit seq2
> seq2
[1] "14760"
My question is why I obtained a number (14760) when I add a string (CATGGTAGGAATAC)
I have an idea : when I edit b, I see
2004 Sep 30
2
Interface between R and Perl
Hi,
I have made a GUI in PerlTk and I would use R within perl.
I actually try to install RSPerl but I have some problems during the compilation
In order to call R from perl I use actually an other system based on the OPEN
command in perl.
It works fine but when I tried to call the fonction plot() of R from perl the
plot do not appears and a file named plot.ps is generated.
Unfortunalelly, my
2008 Apr 09
4
apply lm() for all the columns of a matrix
Hi all,
My question is not really urgent. I can write a loop and solve the
problem. But I know that I'll be in a similar situation many more times so
it would be useful to find out the answer
Is there a fast way to perform linear fit to all the columns of a matrix?
(or in the one dimension of a multi-dimensional array.) I'm talking about
many single linear fits, not about a multiple fit.
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
Thanks Dimitris!!! That's much clearer now. Still have a lot of work to
do this weekend to understand every bit but your code will prove very
useful.
Cheers,
Aziz
-----Original Message-----
From: Dimitrios Rizopoulos [mailto:Dimitris.Rizopoulos at med.kuleuven.be]
Sent: May 12, 2006 4:35 PM
To: Chaouch, Aziz
Subject: RE: [R] Maximum likelihood estimate of bivariate
2006 Mar 02
2
'...' passed to both plot() and legend()
Dear R-devels,
I'd like to create a plot method for a class of objects that passes
the '...' argument to both plot() and legend(), e.g.,
x <- list(data = rnorm(1000))
class(x) <- "foo"
plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL,
...){
dx <- sort(x$data)
plot(dx, dnorm(dx), type = "l", ...)
if (legend)
2007 May 20
2
Number of NA's in every second column
Hi R-users,
How do I calculate a number of NA's in a row of every second column in my
data frame?
As a starting point:
dfr <- data.frame(sapply(x, function(x) sample(0:x, 6, replace = TRUE)))
dfr[dfr==0] <- NA
So, I would like to count the number of NA in row one, two, three etc. of
columns X1, X3, X5 etc.
Thanks in advance
Lauri
[[alternative HTML version deleted]]
2005 May 19
2
plot question
hi all:
xlim and ylim are used to define the interval limits of a plot. I'm interested in the scale of values between this limits.
suppose xlim=c(0,10)
we can have e.g.
0 5 10
0 2 4 6 8 10
0 1 2 3 4 5 6 7 8 9 10
which is the parameter that allows me to modify this?
thanks in advance
alexandre
2006 Jun 16
3
Vector Manipulation
I have a vector that has 1,974 elements and each element is one of the
following (B, F, N, Y). How do I recreate that vector accept in the
place of N put 0 and in the place of B, F or Y put a 1?
Thanks,
Jacob
[[alternative HTML version deleted]]
2004 Aug 26
1
gls: Newton-Raphson or EM?
Hello,
Does anyone know whether the gls function in the nlme library uses the Newton-Raphson or EM algorithm to find the restricted log-likelihood or maximum log-likelihood estimates?
Brendan Klick
bklick@jhsph.edu
[[alternative HTML version deleted]]
2004 May 28
3
gauss.hermite?
The search at www.r-project.org mentioned a function
"gauss.hermite{rmutil}". However, 'install.packages("rmutil")'
produced, 'No package "rmutil" on CRAN.' How can I find the current
status of "gauss.hermite" and "rmutil"?
Thanks,
Spencer Graves
2004 Jun 08
1
How do I sort data containts character
Sorry, it's simple question:
example :
> data.test
label value
1 one 21.35746
2 two 22.07592
3 three 20.74098
>
I would like the return :
label value
3 three 20.74098
1 one 21.35746
2 two 22.07592
Anyone can help it?
Thanks,
regards
Unung Istopo
2004 Jun 09
1
Multiple regression
Hi,
I am trying to do multiple regression on a set of data using backward stepwise regression....however backward stepwise regression is critised for overfitting data. To actually observe the bias and to come up with a better method to use..Could you all stats experts kindly give me pointers to any alternative procedure (or references) to use over backward stepwise regression from your
2004 Jun 22
1
Numerical methods of integration
Hi!
I want to know if there is a function in R that makes integration using
numerical methods. Thank's for helping!
Talita Perciano Costa Leite
Graduanda em Ci??ncia da Computa????o
Universidade Federal de Alagoas - UFAL
Departamento de Tecnologia da Informa????o - TCI
Constru????o de Conhecimento por Agrupamento de Dados - CoCADa
2004 Sep 17
1
controlling printing precision in paste()
Rene,
Look at ?format.
Sean
On Sep 17, 2004, at 9:21 AM, RenE J.V. Bertin wrote:
> Hello,
>
> I can't seem to find the way to modify the precision with which
> paste() prints its floating point numbers, more precisely the number
> of decimal digits printed. This is apparently not controlled by
> options( digits= ), and there is no appropriate argument to paste()
>
2004 Oct 25
1
Multiple formula in one block
Hi Everybody:
I want to draw some chart using command "histogram" and add another curve in it.
Example:
require(stats)
data(singer)
library(lattice)
histogram( ~ height | voice.part, data = singer, nint = 17, endpoints = c(59.5, 76.5), layout = c(2,4), aspect = .5, xlab = "Height (inches)")
Now I got a chart of 8 blocks, then I need add :"