Re: [R] a simple question

2020-01-01 Thread Yuan Chun Ding
Hi Rolf, Yes, choices = as.list(seq(1,5211,1)) is what I want. Thank you so much, Ding From: Rolf Turner [r.tur...@auckland.ac.nz] Sent: Wednesday, January 1, 2020 3:29 PM To: Yuan Chun Ding; r-help@r-project.org Subject: Re: [R] a simple question

Re: [R] a simple question

2020-01-01 Thread Rolf Turner
On 2/01/20 12:16 pm, Yuan Chun Ding wrote: Hi R users, in a Shiny test code, choices = list(1, 2, 3), it generates three components in the choice list, my code works fine and generated tables and plots I want. now I want to modify to choices = list (1, 2, 3, , 5211). list (seq(1, 521

[R] a simple question

2020-01-01 Thread Yuan Chun Ding
Hi R users, in a Shiny test code, choices = list(1, 2, 3), it generates three components in the choice list, my code works fine and generated tables and plots I want. now I want to modify to choices = list (1, 2, 3, , 5211). list (seq(1, 5211,1) does not work, it generates one component

Re: [R] A simple question

2015-07-14 Thread Adams, Jean
R-help readers, For your information ... The package stringi is required to run Alex's code. Alex's message was cross posted to StackOverflow, and seems to have been answered there, http://stackoverflow.com/questions/31398466/r-stri-locate-all-creating-a-start-and-end-matrix Jean On Tue, Jul 1

Re: [R] A Simple Question

2015-07-13 Thread Erich Subscriptions
Is m[[1]] what you need? > On 14 Jul 2015, at 07:40, Alex Kim wrote: > > Hello, > > I am trying to create a matrix that looks like this, using the > stri_locate_all function. > >> x <- "ABCDJAKSLABCDAKJSABCD" >> m <- stri_locate_all_regex(x, 'ABCD') >> m >[[1]] > start end >[1,

[R] A Simple Question

2015-07-13 Thread Alex Kim
Hello, I am trying to create a matrix that looks like this, using the stri_locate_all function. > x <- "ABCDJAKSLABCDAKJSABCD" > m <- stri_locate_all_regex(x, 'ABCD') > m [[1]] start end [1,] 1 4 [2,]10 13 [3,]18 21 I tried converting m into a

[R] A simple question

2015-07-13 Thread Alex Kim via R-help
Hello, I am trying to create a matrix that looks like this, using the stri_locate_all function. > x <- "ABCDJAKSLABCDAKJSABCD" > m <- stri_locate_all_regex(x, 'ABCD') > m [[1]] start end [1,] 1 4 [2,]10 13 [3,]18 21 I tried converting m into a

Re: [R] a simple question

2013-10-03 Thread arun
Hi, Try: set.seed(494)  h<- matrix(sample(1:40,4*124,replace=TRUE),ncol=4)  set.seed(39)  m<- matrix(sample(1:100,10*124,replace=TRUE),ncol=10)  colnames(h)<- paste0("h",1:4)  colnames(m)<- paste0("m",1:10) mat1<-combn(colnames(m),4)  res<- lapply(colnames(h),function(x) {x1<- h[,x];dat1<- do.

Re: [R] A Simple Question

2008-09-17 Thread Ben Bolker
Gao, Aijun i3statprobe.com> writes: > > > Hi: > > I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not > find function "bugs" > Would you please help me since I would like to run some WINBUG programs from your R by reading external data

[R] A Simple Question

2008-09-17 Thread Gao, Aijun
Hi: I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not find function "bugs" Would you please help me since I would like to run some WINBUG programs from your R by reading external data and I am new to R? Do I missing some function? Sh

Re: [R] a simple question of importing data

2008-04-24 Thread Abhijit Dasgupta
Or you could use the read.xls program in the gdata library that uses a perl script underneath. Charles Danko wrote: > try: > var <- read.table("weekly.txt", sep="\t", header=TRUE) > > Charles > > On Thu, Apr 24, 2008 at 3:29 PM, tzsmile <[EMAIL PROTECTED]> wrote: > >> i just want to read data

Re: [R] a simple question of importing data

2008-04-24 Thread Jorge Ivan Velez
Try also, setwd("C:\\") yourdata=read.table("tzmile.txt",header=TRUE) attach(yourdata) yourdata[1:10,] warcode date weeklyrt 130001 16-Dec-05 -0.0043 230001 23-Dec-05 0.1313 330001 30-Dec-05 -0.0844 430001 6-Jan-06 0.0097 530001 13-Jan-06 -0.1009 630001 20-Jan

Re: [R] a simple question of importing data

2008-04-24 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of tzsmile > Sent: Thursday, April 24, 2008 12:30 PM > To: r-help@r-project.org > Subject: [R] a simple question of importing data > > > i just want to read data from Excel an

Re: [R] a simple question of importing data

2008-04-24 Thread Charles Danko
try: var <- read.table("weekly.txt", sep="\t", header=TRUE) Charles On Thu, Apr 24, 2008 at 3:29 PM, tzsmile <[EMAIL PROTECTED]> wrote: > > i just want to read data from Excel and i copied it and pasted into a txt > file. > then i want to use "read.table" to read it. but however i tried, it do

[R] a simple question of importing data

2008-04-24 Thread tzsmile
i just want to read data from Excel and i copied it and pasted into a txt file. then i want to use "read.table" to read it. but however i tried, it doesn't work. can someone help me? data is attached. thanks http://www.nabble.com/file/p16851853/weekly.txt weekly.txt -- View this message in conte