[R] Creating a vector

2008-12-12 Thread PDXRugger
Good day all, I am having seom trouble building a simple vector. Below my sample code shows what ime trying to do and i have pointed out where the issue is. What happens not is that a single "TAZDetermine_FEET" is selected by i need multiple values, as many as there are "cands". I am think

Re: [R] Creating a vector

2008-12-13 Thread Patrick Burns
It seems the crux of the problem is: #Heres my problem...my attempt below is to build a vector of length-"candslength" of all of the #"TAZDetermine_FEET" values that are less than or equal to Dev_size. If you do: TAZDetermine_FEET[ TAZDetermine_FEET <= Dev_size ] then you will get the vecto

[R] Creating a vector of categories

2010-03-26 Thread Christoffer Karlsson
Hi, I have a column in a data frame looking something like: $sex $language $count male english 0 male english 0 female english 32 male spanish 154 female english 11 female norweigan 7 and so on. What I want to do is to order these in to categories, for instance one category where coun

[R] creating a vector of sums

2009-04-28 Thread Rachel Taylor
Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n <- length(X)-1 #calculated the number of values (extra as 0 included) i <- 2:640 #values of i j <- 1:639 #values of i-1

Re: [R] Creating a vector of categories

2010-03-26 Thread Jim Lemon
On 03/26/2010 08:41 PM, Christoffer Karlsson wrote: Hi, I have a column in a data frame looking something like: $sex $language $count male english 0 male english 0 female english 32 male spanish 154 female english 11 female norweigan 7 and so on. What I want to do is to order these

Re: [R] Creating a vector of categories

2010-03-26 Thread Sharpie
Christoffer Karlsson wrote: > > Hi, > > I have a column in a data frame looking something like: > > $sex $language $count > male english 0 > male english 0 > female english 32 > male spanish 154 > female english 11 > female norweigan 7 > > and so on. > What I want to do is to order

Re: [R] Creating a vector of categories

2010-03-26 Thread Sharpie
Sharpie wrote: > > testData$bin <- cut( testData$count, binBreaks, include.lowest = TRUE ) > I also made a slight mistake, you will want to replace inclde.lowest = TRUE with right = FALSE to the call to cut() to preserve the greater-than-or-equal boundary at the lower end of each bin. Sorry

Re: [R] Creating a vector of categories

2010-03-26 Thread Christoffer Karlsson
Thanks a ton guys for your help! Saved me a boat load of time and helped me develop a much better method of doing these things than I had in the past. The method I ended up using was to cut up my counts and aggregating my data as suggested by Petr. Thanks! Chris On Fri, Mar 26, 2010 at 12:05 PM,

Re: [R] creating a vector of sums

2009-04-28 Thread Andrew Dolman
Look at ?cumsum andydol...@gmail.com 2009/4/28 Rachel Taylor > > Hi, > > I am trying to create a function for a goodness-of-fit test for the Pareto > Distribution for some loss data that I have. > So far I have the following: > > function(X=OTOL) > { > n <- length(X)-1 #calculated the number

Re: [R] creating a vector of sums

2009-04-28 Thread jim holtman
?cumsum On Tue, Apr 28, 2009 at 5:30 AM, Rachel Taylor wrote: > > Hi, > > I am trying to create a function for a goodness-of-fit test for the Pareto > Distribution for some loss data that I have. > So far I have the following: > > function(X=OTOL) > { > n <- length(X)-1 #calculated the number of

Re: [R] creating a vector of sums

2009-04-28 Thread Alain Guillet
Look at cumsum() Alain Rachel Taylor wrote: Hi, I am trying to create a function for a goodness-of-fit test for the Pareto Distribution for some loss data that I have. So far I have the following: function(X=OTOL) { n <- length(X)-1 #calculated the number of values (extra as 0 included) i

[R] creating a vector from a file

2011-05-31 Thread heimat los
Hello all, I am new to R and my question should be trivial. I need to create a word cloud from a txt file containing the words and their occurrence number. For that purposes I am using the snippets package [1]. As it can be seen at the bottom of the link, first I have to create a vector (is that ri

[R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
Dear R forum I have a data.frame df = data.frame(dates = c("4/15/2013", "4/14/2013", "4/13/2013", "4/12/2013"), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as "Current_date", 4/15/2013, 4/14/2013, 4/13/2013, 4/12/2013,  "Current_date", 4/15/2013, 4/14/2013

Re: [R] Creating a vector in R

2013-10-06 Thread arun
HI, Try: x1 <- (1:100)^2 A.K. Hi I am newbie of using R. Please help me create vector x(1^2, 2^2, 3^2,,100^2) in R. Thanks you I am looking forward to see your reply soon, Best wish Andrew, __ R-help@r-project.org mailing list https://stat.

Re: [R] creating a vector from a file

2011-05-31 Thread Matt Shotwell
On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: > Hello all, > I am new to R and my question should be trivial. I need to create a word > cloud from a txt file containing the words and their occurrence number. For > that purposes I am using the snippets package [1]. > As it can be seen at the

Re: [R] creating a vector from a file

2011-05-31 Thread heimat los
On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell wrote: > On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: > > Hello all, > > I am new to R and my question should be trivial. I need to create a word > > cloud from a txt file containing the words and their occurrence number. > For > > that purpo

Re: [R] creating a vector from a file

2011-05-31 Thread David Winsemius
On May 31, 2011, at 10:19 AM, heimat los wrote: On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell wrote: On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: Hello all, I am new to R and my question should be trivial. I need to create a word cloud from a txt file containing the words and t

Re: [R] creating a vector from a file

2011-05-31 Thread Jonathan Daily
So you need to read a file into R in that format? Try changing the values in ?read.table. Using the example, I was able to get the data using: read.table("clipboard", sep = "=", header = F, colClasses = c("character", "numeric")) On Tue, May 31, 2011 at 10:19 AM, heimat los wrote: > On Tue, Ma

Re: [R] creating a vector from a file

2011-05-31 Thread Matt Shotwell
On Tue, 2011-05-31 at 16:19 +0200, heimat los wrote: > On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell > wrote: > On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: > > Hello all, > > I am new to R and my question should be trivial. I need to > create a word >

Re: [R] creating a vector from a file

2011-05-31 Thread David Winsemius
On May 31, 2011, at 10:38 AM, David Winsemius wrote: On May 31, 2011, at 10:19 AM, heimat los wrote: On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell wrote: On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: Hello all, I am new to R and my question should be trivial. I need to create

Re: [R] creating a vector from a file

2011-05-31 Thread heimat los
On Tue, May 31, 2011 at 5:14 PM, David Winsemius wrote: > > On May 31, 2011, at 10:38 AM, David Winsemius wrote: > > >> On May 31, 2011, at 10:19 AM, heimat los wrote: >> >> On Tue, May 31, 2011 at 4:12 PM, Matt Shotwell >>> wrote: >>> >>> On Tue, 2011-05-31 at 15:36 +0200, heimat los wrote: >>

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread andrija djurovic
?rep On Wed, Apr 17, 2013 at 11:11 AM, Katherine Gobin wrote: > Dear R forum > > I have a data.frame > > df = data.frame(dates = c("4/15/2013", "4/14/2013", "4/13/2013", > "4/12/2013"), values = c(47, 38, 56, 92)) > > I need to to create a vector by repeating the dates as > > "Current_date", 4/

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
? Regards Katherine --- On Wed, 17/4/13, andrija djurovic wrote: From: andrija djurovic Subject: Re: [R] Creating a vector with repeating dates To: "Katherine Gobin" Cc: "r-help@r-project.org" Date: Wednesday, 17 April, 2013, 10:14 AM ?rep On Wed, Apr 17, 2013 at 11:

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Rui Barradas
Hello, Try the following. rep(c("Current_date", as.character(df$dates)), 3) Hope this helps, Rui Barradas Em 17-04-2013 10:11, Katherine Gobin escreveu: Dear R forum I have a data.frame df = data.frame(dates = c("4/15/2013", "4/14/2013", "4/13/2013", "4/12/2013"), values = c(47, 38, 56,

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread andrija djurovic
> So this is combination of dates and a string. Hence, I am just wondering > if it is possible to create such a vector or not? > > Regards > > Katherine > > > --- On *Wed, 17/4/13, andrija djurovic * wrote: > > > From: andrija djurovic > Subject: Re: [R] Cr

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Jim Lemon
On 04/17/2013 07:11 PM, Katherine Gobin wrote: Dear R forum I have a data.frame df = data.frame(dates = c("4/15/2013", "4/14/2013", "4/13/2013", "4/12/2013"), values = c(47, 38, 56, 92)) I need to to create a vector by repeating the dates as "Current_date", 4/15/2013, 4/14/2013, 4/13/2013, 4

Re: [R] Creating a vector with repeating dates

2013-04-17 Thread Katherine Gobin
Dear Sir, Thanks a lot for your valuable suggestions and help. Regards Katherine --- On Wed, 17/4/13, Jim Lemon wrote: From: Jim Lemon Subject: Re: [R] Creating a vector with repeating dates To: "Katherine Gobin" Cc: r-help@r-project.org Date: Wednesday, 17 April, 2013, 10:35

[R] Creating a vector based on lookup function

2008-11-26 Thread PDXRugger
I am still searching for a solution to what i think is a simple problem i am having with building a vector in a for loop. I have built a more understandable example so hopefully that will help..help you, help me, if you know what i mean. dev=400 #test location model TAZs to reference cands=c(1

Re: [R] Creating a vector based on lookup function

2008-11-26 Thread Charles C. Berry
On Wed, 26 Nov 2008, PDXRugger wrote: I am still searching for a solution to what i think is a simple problem i am having with building a vector in a for loop. I have built a more understandable example so hopefully that will help..help you, help me, if you know what i mean. dev=400 #test loc

[R] creating a vector automatically containing numbers 1, 100, 10000, 1000000, ...

2011-09-27 Thread Marion Wenty
hello, i am looking for a way to get a vector containing the numbers: 1,100,1,100,... each element should have two ceros more than the one before it until the number 1e+200 without using a loop. thank you very much in advance for your help! marion [[alternative HTML version

Re: [R] creating a vector automatically containing numbers 1, 100, 10000, 1000000, ...

2011-09-27 Thread Barry Rowlingson
On Tue, Sep 27, 2011 at 9:33 AM, Marion Wenty wrote: > hello, > > i am looking for a way to get a vector containing the numbers: > > 1,100,1,100,... > > each element should have two ceros more than the one before it until the > number > > 1e+200 > > without using a loop. 10^(seq(0,200,by

Re: [R] creating a vector automatically containing numbers 1, 100, 10000, 1000000, ...

2011-09-27 Thread Marion Wenty
hello barry, thank you very much! i had thought of the seq function but only in regard to normal differences. marion 2011/9/27 Barry Rowlingson > On Tue, Sep 27, 2011 at 9:33 AM, Marion Wenty > wrote: > > hello, > > > > i am looking for a way to get a vector containing the numbers: > > > > 1,10