similar to: generate repeats of a vector's elements

Displaying 20 results from an estimated 800 matches similar to: "generate repeats of a vector's elements"

2008 Jul 22
2
Table orderd by frequencies
Dear List, I try to order the output of a table by the frequencies of the vector I am look at. The object I am looking at is a factor with a lot of levels that were named only once. Therefore it would be much easier to order the output by the frequencies of the levels. E.g. > levels(a) "a" "b" "c" "d" Preferred outcome: table(a) b c a d 10 5 1 1
2008 Jul 24
3
incrementing for loop by 2
Dear List-serv members: How can I structure a for loop so that it will increment the counter by two using R? I am just looking for a simple example that shows where the incrementing part should go. Thanks! Jennifer -- Jennifer Hayes Clark Assistant Professor Department of Political Science University of Houston Houston, TX 77204-3011 [[alternative HTML version deleted]]
2008 Jul 21
3
vector help
hi I have vector test. It has 3 elements. I want to join the three into one vector. "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20". how can i do it. > class(test) [1] "character" > test [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157" [3] "20" Ramya --
2008 Jul 25
3
Help with rep
Hi Is it possible to use the rep command (or maybe some other "shortcut") to create a vector with the following format: 4 3 4 2 3 4 1 2 3 4 Any help is much appreciated. Thanks Jacob Jacob L van Wyk Department of Statistics University of Johannesburg, APK Box 524 Auckland Park 2006 South Africa Office Tel: +27 11 559 3080 Fax: +27 11 559 2832 [[alternative HTML version
2008 Aug 20
4
Conversion - lowercase to Uppercase letters
I would like to know how to convert a string with characters to all uppercase or all lowercase? If anyone could let me know if there exists a function in R for the conversion, that will be very helpful. Regards, Suman [[alternative HTML version deleted]]
2008 Jul 28
3
Fill in NA values in vector with previous character/factor
I have a vector of data (species names) interspersed with NA values and I want a function to "fill in the blanks", replacing NA values with whatever the last species name was. For example the vector: "A","B",NA,NA,"C",NA,NA,NA,NA,"D",NA,NA. should evaluate to: "A" "B" "B" "B" "C"
2008 Aug 15
2
Combination with repetition
Hi there! I can't find any information about creating combinations with repetitions in R. The function combn() does create combinations, but _without_ repetitions. Here is what I need to do: svIter <- 1000 xx <- matrix(rnorm(m*n), c(m, n)) sequence <- seq(range(xx)[1], range(xx)[2], length.out = svIter^(1/q)) expand.grid(secuence, secuence, .../q times/..., secuence) That is,
2008 Aug 15
5
x-axis with month and year
Hey list! I have a csv-file with two variables: (Date,CMI) Date,CMI Jan-93,3.24 Feb-93,-2.56 . . . Dec-06, 8.25 When I want to plot this dataset, R is sorting the date in alphabetical order. Is there any way to tell R not to do it? I know it is probably an easy issue but I couldn't find a solution so far. I have seen so many tips already but can't apply it on my own dataset. Thank
2008 Aug 16
4
Dealing with NaN's in data frames
I am looking for the most efficient way to replace all occurrences of NaN in a data frame with NA. I can do this with a double loop, but it seems that there should be a higher level and more efficient way. With is.na, I could use ifelse, but if.nan seems not to have similar capabilities. TIA, Jon Peck Jon K. Peck jkpeck@aya.yale.edu [[alternative HTML version deleted]]
2008 Jul 20
3
Order of columns(variables) in dataframe
Dear R experts,   I have a dataframe with 4 columns (variables). I want to redorder (or reposition) these columns on the basis of a value in its last row. e.g.   df1<-data.frame( v1= c(2,3,1,9,5), v2=c(8,5,12,4,11), v3=c(7,8,2,6,9), v4=c(1,4,6,3,6))    > df1    v1 v2 v3 v4 1  2  8  7  1 2  3  5  8  4 3  1 12  2  6 4  9  4  6  3 5  5 11  9  6 I wanto to get the order of df1 on the basis of
2008 Jul 20
2
fill in area between 2 lines with a color
Hi - I'd like to have the area between 2 lines on a x-y plot be filled with grey, but I haven't had any luck using polygon or rect. (In reality, I'd like to do this for twice - once for a low group and once for a high group - and then I'd like to plot a set of data points for a 'normal' group together with these 2 grey areas.) Here's a simple example of the 2 lines:
2004 Jul 22
2
MSSQL ODBC CDR
Hello I am having trouble setting up the cdr_odbc with MSSQL server. Has anybody done this? I have followed what little documentation I can find. Asterisk errors on a connection error, but tcpdump doesn't even show an attempt. Does anybody have some examples for MSSQL ODBC CDR? I've downloaded unixODBC and the FreeTDS project, recompiled asterisk.... Thanks Duane Cox --------------
2008 Aug 01
3
Newbie question: How to use tapply() on several vectors simultaneously
Dear R users, I have a newbie-question that I couldn't resolve after reading through several pieces of documentation and searching the archive. I have a data.frame containing experimental data from a group experiment in psychology. Each line represents a single participant, but participants were assigned to groups of three or four persons. One variable indicates each participants'
2008 Jul 18
2
column wise paste of data.frames
Hi everybody! I'm sure that I overlook something and feel quite stupid to ask, but I have not found an easy solution to the following problem: Take e.g. the Orthodont data from the nlme package: > head(Orthodont) Grouped Data: distance ~ age | Subject distance age Subject Sex 1 26.0 8 M01 Male 2 25.0 10 M01 Male 3 29.0 12 M01 Male 4 31.0 14 M01 Male
2005 Jan 26
1
cant do it in CLI anymore?
Hi Floks, This is probably really dumb but here goes: I used to be able to place calls to my SIP phones from the CLI using the 'Dial' command for testing. I have installed asterisk on a new machine and copied over the .confs and started it up. It all works fine. But when I try to initiate a call from the CLI using 'Dial' it just says: *CLI> Dial No such command
2014 Apr 25
1
Statistician/Programmer opening at IMS
IM, Inc. has a statistician/programmer position open. Can I advertise this on the listserv? If so, I will forward the ad. Thanks, Mary Lamb Executive Administrator Information Management Services (IMS), Inc. 3901 Calverton Boulevard, Suite 200 Calverton, MD 20705 (301) 680-9770 lambm at imsweb.com ________________________________ Information in this e-mail may be confidential. It is
2004 Apr 29
1
User picks up phone, hears another call, not dialtone
First of all - Many, many thanks to Mark for his troubleshooting and fix of bug 1320 (FXO_KS signalled Zap Channels on Adtran 750 Channel Bank Stuck in Rsrvd State). I have heard complaints that once every couple weeks, when a user picks up their analog phone (t1 span off of a TE410P into an Adtran 750 with 6 FXS cards), they don't get dialtone, but instead, hear another conversation.
2005 Jan 18
9
# Transfers.
So I have read and read and read... google is my friend and the wiki is by brother... However, I am still unclear on what the preferred method of using the pound sign is. If the Pound sign is set aside for Transfer.. Then when I make an outbound call to my bank I can not "Enter my PIN followed by Pound" Likewise if I turn off the ability to transfer when initiating a call, my bank pin
2010 Apr 17
1
[LLVMdev] Compiling LLVM on SPARC
Hello all, I've been trying to compile LLVM and LLVM-GCC on the SPARC architecture, but I've been running into lots of issues: LLVM 2.5 works, but 2.6 does not -- gcc can't even parse the triple.h file needed in commandline.cpp. For 2.5, there's a compile error for llvm-gcc for that version. I've been compiling with gcc 4.5.0, and have also tried 4.4.3. I've turned
2004 Jun 27
4
Re Cron
Hi List Is there a cron that I con do to replace this, as the fx0 card doesnt hang up properly phonegc:/home/samantha# asterisk -r Asterisk CVS-05/30/03-17:17:07, Copyright (C) 1999-2001 Linux Support Services, Inc. Written by Mark Spencer <markster@linux-support.net> ========================================================================= Connected to Asterisk CVS-05 currently running on