Sarah,
i = 1
while i > 0 {
print("Thank you")
i = i + 1
}
---
Richard Sherman
> On Mar 22, 2014, at 8:06 PM, Sarah Goslee wrote:
>
> Hi Richard,
>
> ?if
> ?ifelse
> ?subset
> ?[
>
> depending on the specific operation. See inline.
>
> Given a data frame tdf with x, y, and a (or with
Hi all ,
I know i am asking a silly question , please help me a bit ,
fun<-function()
<<<---I have this function , dont know what to
return here.
{
JUSTGIVING HERE THE MAINWINDOW ,
AVOIDING GIVING THE WHOLE FUNCTION
On 03/23/2014 01:01 PM, eliza botto wrote:
Dear UseRs,
I have a question regarding reading the coordinates within a country' map. I
drew map of ireland by using the following commands
library("maps")
library("mapproj")
map("world", "ireland")
map.axes()
You can clearly see the axis labelled. Wha
Hi Richard,
?if
?ifelse
?subset
?[
depending on the specific operation. See inline.
Given a data frame tdf with x, y, and a (or with vectors creating a
data frame using):
tdf <- data.frame(x=x, y=y, a=a)
On Sat, Mar 22, 2014 at 10:21 PM, Richard Sherman wrote:
> Hi all,
>
> A simple question,
Hi all,
A simple question, new-ish to R, coming from Stata, and I yes I've looked at
great length and not found ...
In Stata I might write (with * in place of #)
# regress y on x in the set of observations where a==1
reg y x if a==1
# descriptives on x where a==1
su x if a==1
# generate a lo
Dear UseRs,
I have a question regarding reading the coordinates within a country' map. I
drew map of ireland by using the following commands
library("maps")
library("mapproj")
map("world", "ireland")
map.axes()
You can clearly see the axis labelled. What is want to do is to draw lines
(both verti
Hi,
May be this helps:
a <- 1:3
b <- 4:6
z <- as.vector(rbind(a,b))
z
#[1] 1 4 2 5 3 6
#or
z1 <- setNames(c(a,b),rep(seq_along(a),2))
z1 <- as.vector(z1[order(names(z1))])
z1
#[1] 1 4 2 5 3 6
A.K.
Dear R users,
Given two vectors x and y
a=1 2 3
b=4 5 6
i want to combine them into a sin
Apologies if the question is a but naïve, I am a novice in time series data
handling in R
I have the following type of data, in a long format ( as called by the
spacetime vignette the table contains also space, not noted here):
User | Date | Otherdata |
A | 01/01/2014 | aa
A | 01/01/2014 | b
Dear R users,
Given two vectors x and y
a=1 2 3
b=4 5 6
i want to combine them into a single vector z as 1 4 2 5 3 6
Thanks for your help
Tham
--
View this message in context:
http://r.789695.n4.nabble.com/Merge-two-vectors-into-one-tp4687361.html
Sent from the R help mailing list archive
HI Eliza,
No problem.
This should be faster:
res2 <- matrix(as.vector( mat1[row.names(mat1) %in% df1$Ry,colnames(mat1) %in%
df1$Rx]),nrow=120, dimnames=list(NULL,colnames(res)))
identical(res,res2)
#[1] TRUE
A.K.
On Saturday, March 22, 2014 4:14 PM, eliza botto
wrote:
Thankyou very very
Thankyou very much arun,I worked perfectly.:D
Eliza
> Date: Sat, 22 Mar 2014 13:18:21 -0700
> From: smartpink...@yahoo.com
> Subject: Re: Latest question
> To: r-help@r-project.org
> CC: eliza_bo...@hotmail.com
>
> HI Eliza,
> No problem.
>
> This should be faster:
> res2 <- matrix(as.vector( ma
The survival function, S(t), gives you the probability of surviving beyond time
t starting from time 0. If you want to know the probability of surviving
beyond time t *given* that you survived to get a heart surgery at time u>0,
that is a different function. It might be S(t)/S(u) depending on
On 03/23/2014 03:15 AM, Jonathan Greenberg wrote:
R-helpers:
I was wondering, given a vector of data, if there is a way to
calculate the break points based on the breaks= parameter from
histogram, but skipping all the other calculations (all I want is the
breakpoints, not the frequencies). I ca
Dear R-Users,
I have a question about the dglm() function from the dglm Package (V
1.6.2). The dglm() function fits double-generalized linear models as
described in
Smyth, G. K. (1989). Generalized linear models with varying
dispersion. J. R. Statist. Soc. B, 51, 47-60. I use d
Hi Doran
I'm also trying to scrape the leaderboard data. Did you happen to figure
out how to extract the athlete's team/affiliate? Trying to do a bit of code
to figure out which teams will qualify when individuals are removed.
On Sunday, March 2, 2014 2:34:21 PM UTC-5, Doran, Harold wrote:
>
>
Hi,
you possibly know that there are a lot of methods to determine the number of
bins. As a default R has the Sturges method. I think it does something like
x <- runif(100)
mybreaks <- hist(runif(x))$breaks
r <- max(x)-min(x)
br <- nclass.Sturges(x) #note this is a really simple approach and se
R-helpers:
I was wondering, given a vector of data, if there is a way to
calculate the break points based on the breaks= parameter from
histogram, but skipping all the other calculations (all I want is the
breakpoints, not the frequencies). I can, of course, simply run the
histogram and extract t
Dear Bert and Arun,
Thankyou very much for your help. I am really obliged. :D
Eliza
> Date: Sat, 22 Mar 2014 08:17:31 -0700
> Subject: Re: [R] plotting vectors of different lengths
> From: gunter.ber...@gene.com
> To: smartpink...@yahoo.com; jorgeivanve...@gmail.com; eliza_bo...@hotmail.com
> CC
On Sat, Mar 22, 2014 at 7:10 AM, arun wrote:
> [
No no no.
She (apparently) says she wants to plot a numeric grid given the x and
y coordinates of the grid, not create a character matrix of strings
representing the ordered pairs.
set.seed(1234)
x <- runif(6)
y <- runif(5)
dat <- expand.grid(x=
Dear all,
Sandy Weisberg, Michael Friendly, and I would like to announce a new version of
the effects package, 3.0-0, now on CRAN; the new version should shortly
percolate through the various CRAN mirrors.
The major enhancement in this version of effects is the ability to plot partial
residua
Hi,
You could try:
res <- data.frame(dat[rep(1:nrow(dat),with(dat,end-begin+1)),1:2],
month=unlist(apply(dat[,3:4],1,function(x) seq(x[1],x[2]
row.names(res) <- 1:nrow(res)
A.K.
On Saturday, March 22, 2014 6:29 AM, PabloNeruda wrote:
Dear R-Users and developers,
I am used to work with s
Hi Eliza,
You could also do:
res <- outer(y,x, FUN=function(u,v) paste0("(",u,",",v,")"))
dimnames(res) <- list(y,x)
#or
names(x) <- x
names(y) <- y
outer(y,x, FUN=function(u,v) paste0("(",u,",",v,")"))
A.K.
On Saturday, March 22, 2014 7:46 AM, Jorge I Velez
wrote:
You are welcome, Eliza.
Hi,May be this helps:
dat1 <- read.table(text="ID 1 2 3 4
5 6
A 1988 1995 2000 2000 2007
B 1995 1997 2000 2001
C 2001
Thanks once again jorge. Regarding your previous reply, i got 50 warnings.
Here is what I am trying to do
xx<-0.5*(-359.5:359.5)
yy<- 0.5*(-89.75:89.75)
x <- xx
y <- yy
dat1<-matrix(apply(expand.grid(x = y, y = x), 1, function(r) paste0("(", r[1],
",", r[2], ")")), ncol = length(x))
dat<-noquote
You are welcome, Eliza.
If I understand correctly, the following will do:
x <- 1:8
y <- 1:5
matrix(apply(expand.grid(x = y, y = x), 1, function(r) paste0("(", r[1],
",", r[2], ")")), ncol = length(x))
Best,
Jorge.-
On Sat, Mar 22, 2014 at 10:37 PM, eliza botto wrote:
> Thankyou very much jorg
Thankyou very much jorge. It would a great favor if i may know how to go from
x=1,2,3,4,5,6,7,8 and y=1,2,3,4,5
TO
1 2 3 4 5 6 7 8
1 (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (1,7) (1,8)
2 (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (2,7) (2,8)
3 (3,1) (3,2) (3,3) (3,
Hi Eliza,
Perhaps the following?
matpoints(t(dat), type = 'l')
HTH,
Jorge.-
On Sat, Mar 22, 2014 at 10:18 PM, eliza botto wrote:
>
> Dear useRs,
> I have two column vectors of different lengths say x=1,2,3,4,5,6,7,8 and
> y=1,2,3,4,5. I wanted to plot them by using "points()" command over an
Dear useRs,
I have two column vectors of different lengths say x=1,2,3,4,5,6,7,8 and
y=1,2,3,4,5. I wanted to plot them by using "points()" command over an already
existed image but got an error, "Error in xy.coords(x, y) : 'x' and 'y' lengths
differ".What i actually wanted to do was to plot th
Dear All,
my 3D PDF output package has been updated to fix incompatibility with
recent versions of the rgl package.
The source code of the package and demo output are at
http://www2.iaas.msu.ru/tmp/u3d/rgl/
Sincerely, Michail
__
R-help@r-project.org
Dear R-Users and developers,
I am used to work with singular data but now I have to get my data of an
spell-data-frame conducted in a big German longitudinal survey.
The data structure is:
persnr spelltypbegin end
xf105 10 1 5
xf105 1 6 15
xf106 4 7
Also, once you are working in R, you need to familiarize yourself with the
concept of a factor object. These are used to represent categories in R. Unlike
SAS, R considers the categorical/quantitative distinction as part of the
variable, e.g. in modeling you don't use CLASS directives, you ensur
Hi
Why didn't you google for "maps in R"?
Both the help pages for the GEOmap functions and the accompanying vignette for
GEOmap clearly show how you should ad e.g. points to a map.
Here is what you could have done after a careful reading of the documentation.
library(geomapdata)
data(japmap)
32 matches
Mail list logo