Displaying 20 results from an estimated 10000 matches similar to: "Previous Commands"
2005 Aug 17
2
power of a matrix
Dear all,
I have a population with three age-classes, at time t=0 the population
is:
n.zero <- c(1,0,0)
I have a transition matrix A which denotes "fertility" and "survival":
A <- matrix(c(0,1,5, 0.3,0,0, 0,0.5,0), ncol=3, byrow=TRUE)
To obtain the population at t=1, I calculate:
A %*% n.zero
To obtain the population t=2, I calculate:
A %*% (A %*% n.zero)
... and so
2005 Jan 21
6
Avoiding a Loop?
Dear R-Helpers,
I have a matrix where the first column is known. The second column is
the result of multiplying this first column with a constant "const". The
third column is the result of multiplying the second column with
"const".....
So far, I did it like this (as a simplified example):
nr.of.columns <- 4
myconstant <- 27.5
mymatrix <- matrix(numeric(0), nrow=5,
2003 Oct 10
0
Previous Commands, Summary
Dear all,
I don't know what was the actual remedy, but after installing readline and
ncurses and then re-installing R, everything works fine (=calling the
commands history with the cursor keys).
I would like to thank for the help provided by Jason Turner, Philippe
Glaziou, Peter Dalgaard and Brian Ripley.
Best,
Roland
> -----Original Message-----
> From: Prof Brian Ripley [SMTP:ripley
2005 Dec 08
3
Reshaping data
Dear all,
given I have data in a data.frame which indicate the number of people in
a
specific year at a specific age:
n <- 10
mydf <- data.frame(yr=sample(1:10, size=n, replace=FALSE),
age=sample(1:12, size=n, replace=FALSE),
no=sample(1:10, size=n, replace=FALSE))
Now I would like to make a matrix with (in this simple example)
10 columns (for the
2005 Sep 19
6
Teaching R - In front of the computer?
Dear R-Users,
given you have been teaching R to students (grad level, mainly social
science background, no previous programming experience, 80% know SPSS),
what are your experiences concerning the style of teaching? Do you
prefer to stand in front of the class like in "normal" lectures and you
show them slides? Or do you you explain some concept (for example things
like
2009 Jan 18
8
regex -> negate a word
Dear all,
let's assume I have a vector of character strings:
x <- c("abcdef", "defabc", "qwerty")
What I would like to find is the following: all elements where the word
'abc' does not appear (i.e. 3 in this case of 'x').
Since I am not really experienced with regular expressions, I started
slowly and thought I find all word were
2005 Feb 03
2
Surprising Behavior of 'tapply'
Dear all,
I wanted to make a two-way-table of two variables with a counting
variable stored in another column of a dataframe. In version 1.9.1, the
behavior is as expected as shown in the simplified example code.
> sex <- rep(c("F", "M"), 5)
> income <- c(rep("low", 5), rep("high", 5))
> count <- 1:10
> mydf <-
2005 Nov 23
2
Dancing lissajous
We can't post images here so I've put up a web page to show off a neat
little animation in R:
http://www.geocities.com/robsteele/
Adios!
2006 Jul 14
2
References verifying accuracy of R for basic statisticalcalculations and tests
Hi,
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Corey Powell
>
> Do you know of any references that verify the accuracy of R
> for basic statistical calculations and tests. The results of
> these studies should indicate that R results are the same as
> the results of other statistical packages to a certain number
> of decimal places on some benchmark
2003 Jul 08
3
Characters and Numeric Values in One Matrix
Dear R-Users,
I want to ask a question for a colleague of mine. He wants to put a
character vector and a numeric vector into one matrix and still have the old
character and numeric type for the respective columns.
Unfortunately, I am just starting using R and I could not help him.
Is there an easy and straightforward way to do this in R?
Maybe a little example facilitates understanding our
2005 Feb 21
3
Sorting a matrix on two columns
Hello,
If a matrix with 5 columns has been defined and the first two columns
need to be sorted in ascending order, how can this be achieved whilst
ensuring the
other 3 columns data are in relative position to the sorted columns?
Glen Jones
[[alternative HTML version deleted]]
2011 Nov 28
1
Avoid package in build process when not supported on OS
Dear all,
I am currently working on a package which involves some simulation where no current simulation run depends on a previous simulation run.
That is why I decided to parallelize the computation using the doMC package (which exists only for unix-like OS).
I can create a package without any R CMD check and R CMD build errors on my computers (Ubuntu Linux 32bit & 64 bit).
The problem
2005 May 22
2
Maps, Eastern Europe
Dear all,
I would like to employ a European map in a presentation. My idea was to
use:
library(mapdata)
map("worldHires", c("Austria", "Switzerland", "Germany"))
where I include all countries from my analysis as a vector of character
strings like in the example above. Unfortunately, I was unable to
specify the Baltic States (Latvia, Lithuania, Estonia) or
2004 Aug 12
9
Giving a first good impression of R to Social Scientists
Dear all,
in the coming Winter Semester, I will be a teaching assistant for a course
in Survival Analysis. My job will be to do the lab sessions. The software
used for these lab sessions will be R. Most of the students have a
background in social sciences and the only stats package they used so far is
most likely SPSS.
So I assume they might be quite surprised the first time they see R
2003 Feb 14
1
FW: [Fwd: Re: [S] Exact p-values]
Dear all
Just for fun, I have just downloaded the paper mentioned below and checked
it with R-1.6.1.
Everything is ok with exception of Table 2b, where I get always 1 instead of
0.5:
> pbinom(1e15,2e15,0.5)
[1] 1
Which value should be correct?
Best regards
Christian Stratowa
==============================================
Christian Stratowa, PhD
Boehringer Ingelheim Austria
Dept NCE Lead
2003 Nov 05
3
map does not display maps, MacOSX
Hi,
I installed the maps and mapdata libraries on my R-1.8.0 on
MacOSX 10.2.8 (jaguar on a powerbook G4), and failed to make the
map function work properly:
R : Copyright 2003, The R Development Core Team
Version 1.8.0 (2003-10-08)
[...]
> library(maps)
> map()
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file
2005 Mar 14
5
Mandrake 10.1
Dear all,
I am trying to install the R-2.0.0-1mdk.i586.rpm
<http://cran.planetmirror.com/bin/linux/mandrake/10.0/R-2.0.0-1mdk.i586.rpm>
file on mandrake 10.1. Since the file is, originally, meant for
Mandrake 10.0, it is not surprising me that the installation does not work.
The error message that I get can be translated in something like:
"impossible to install since the info
2003 Oct 02
8
r editors
Hi ,
I am programming on a windows system and have problems
using notepad which is my main editor.Each time I try
to open the editor from the R IDE, R crashes.
So I always have to copy my codes from notepad and
paste in R to run them.
CAn someone tell me if I am doing anything wrong or is
there a better editor(freeware) which I could get.
thanks
cilver
=====
=====================
Sylvie B.
2007 Dec 14
1
Result depends on previous result; easy with a loop; but without a loop?
Dear all,
I am pretty sure that this has been discussed before. Unfortunately, I
can not find anything in the archives -- probably because I am
"RSiteSearching" for the wrong terms. If I remember correctly, I think I
even asked this question a few years ago. But I cannot even find this.
The basic problem is that a result depends on a previous result. This is
easy with a loop--but
2007 Dec 04
6
Is R portable?
Recently I came across an interesting web site:
http://portableapps.com/. The idea is simple, this is software that
is possible to install and run on some type of USB memory, a stick or
one of these hard disks. I can think of a number of situations where
this could be handy. In addition memory sticks are getting cheaper
and more powerful by the day.
So: Is it possible to run R off one of