[R] Searching for Enumerated Items using str_count() from the stringr package

2017-09-28 Thread Dan Abner
Hi all, I have a large number of text strings to search for enumerated items. However, I am receiving this error message even though I thought that I properly escaped the special character closed parenthesis: > Count<-str_count(text3,keywords) Error in stri_count_regex(string, pattern,

[R] Efficient Binning

2017-07-14 Thread Dan Abner
Hi all, I have a situation where I have 16 bins. I generate a random number and then want to know which bin number the random number falls in. Right now, I am using a serious of 16 if() else {} statements which get very complicated with the embedded curly braces. Is there a more efficient (i.e.,

Re: [R] Counting enumerated items in each element of a character vector

2017-04-26 Thread Dan Abner
;> > >>> B. > >>> > >>> > >>> > >>>> On Apr 25, 2017, at 8:23 PM, Boris Steipe <boris.ste...@utoronto.ca> > wrote: > >>>> > >>>> How about: > >>>> > >>>> unlis

[R] Counting enumerated items in each element of a character vector

2017-04-25 Thread Dan Abner
Hi all, I am looking for a streamlined way of counting the number of enumerated items are each element of a character vector. For example: text1<-c("This is an example. List 1 1) Example 1 2) Example 2 10) Example 10 List 2 1) Example 1 2) Example 2 These have been examples.","This is another

[R] Generating a Special Histogram

2017-01-05 Thread Dan Abner
Hi all, Is anyone aware of a package, function, or general R trick that would make generating histograms like the one in the attachment easy in R (i.e., without manually drawing each individual horizontal line and specifying the coordinates for a textbox for each number)? I need to make ~12 of

[R] Extracting non-matching elements of one vector from another

2016-12-31 Thread Dan Abner
Hi all, I have 2 vectors and need to extract only the elements from v2 that do not appear in v1. What is the most efficient way to do this? In the example below, I need to extract "var1". v1<-"b0" v2<-c("b0","var1") Thanks, Dan [[alternative HTML version deleted]]

Re: [R] Generating Heavy and Light Tailed Normal Variates

2016-12-16 Thread Dan Abner
vily depends on the context you have in mind. > > Cheers, > Bert > > > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County"

[R] Generating Heavy and Light Tailed Normal Variates

2016-12-16 Thread Dan Abner
Hi all, I need to generate heavy and light-tailed normal variates separately for demonstration purposes. I figure for the heavy-tailed, I will just generate variates from a t distribution with low degrees of freedom. How does one generate light-tailed normal variates? Thanks, Dan

[R] Equivalent in R of the Contains operator in SAS

2016-04-16 Thread Dan Abner
Hi all, I want to select all variables in the data.frame with a name that includes are certain string. Something like the following: merge3[,names(merge3) %in% c("Email","Email.x")] But there are too many variations on the Email variable names to list them all. Can anyone advise? Thanks! Dan

[R] Exporting column names with spaces with write.csv() XXXX

2015-09-05 Thread Dan Abner
Hi all, I have a number of columns with spaces in the column names exactly as I want them in R. When I go to export the data table to csv using write.csv(), the fn adds periods in place of the spaces. Is there a way to suppress the addition of the periods? Thanks, Dan

Re: [R] Find and replace backslashes XXXX

2015-05-27 Thread Dan Abner
, May 26, 2015 at 9:30 PM, Dan Abner dan.abne...@gmail.com wrote: Hi all, I realize that the backslash is an escape character in R, therefore, I am trying to replace it with a forward slash. Can someone please suggest how to get this code to work? lib-gsub(\,/,X:\Classes\TT\Automation) Error

[R] Find and replace backslashes XXXX

2015-05-26 Thread Dan Abner
Hi all, I realize that the backslash is an escape character in R, therefore, I am trying to replace it with a forward slash. Can someone please suggest how to get this code to work? lib-gsub(\,/,X:\Classes\TT\Automation) Error: unexpected symbol in lib-gsub(\,/,X Thanks, Dan

Re: [R] Custom sampling method in R XXXX

2014-06-24 Thread Dan Abner
Of Dan Abner Sent: Monday, June 23, 2014 3:19 PM To: Greg Snow Cc: r-help@r-project.org Subject: Re: [R] Custom sampling method in R Hi Greg, Thanks, this makes sense. I can envision the call to the sample fn like you are discribing. Any ideas on how to construct the vector? I still am

[R] Custom sampling method in R XXXX

2014-06-23 Thread Dan Abner
Hi all, I have the following situation and a good efficient way to perform this operation in R has not come to me. Any suggestions/input are welcome. I have a user-defined parameter (let's call it x) whose value is selected from a set of possible values (j). Once the user selects one of the

Re: [R] Custom sampling method in R XXXX

2014-06-23 Thread Dan Abner
. On Mon, Jun 23, 2014 at 3:11 PM, Dan Abner dan.abne...@gmail.com wrote: Hi all, I have the following situation and a good efficient way to perform this operation in R has not come to me. Any suggestions/input are welcome. I have a user-defined parameter (let's call it x) whose value

[R] mean fn in combination with by() XXXX

2014-04-10 Thread Dan Abner
Hi all, Can anyone please explain the following results (why does median() work here but not mean())? Is there a fix or work around for this? Thanks, Dan by(urpdata[,2],urpdata[,12],mean,na.rm=TRUE) Error in FUN(X[[1L]], ...) : could not find function FUN

[R] Question about ifelse() XXXX

2013-12-02 Thread Dan Abner
Hi all, Can anyone explain what is happening with element 4,4 of c1? ifelse() is not recongizing it as value 1: c1 q1q2q3q4 q1 1.000 0.6668711 0.6948419 0.5758860 q2 0.6668711 1.000 0.6040746 0.4917447 q3 0.6948419 0.6040746 1.000 0.4730732 q4

[R] arules package apriori() fn error message XXXX

2013-10-31 Thread Dan Abner
Hi everybody, I am using the apriori() fn in the arules package and am encountered an error. rules - apriori(rdayst,parameter = list(support = 0.01, confidence = 0.6)) You chose a very low absolute support count of 0. You might run of memory. I assume this is related to the value of .01

[R] Subtotals by id for a large number of columns XXXX

2013-10-30 Thread Dan Abner
Hi everybody, I have data in the format of the example data below where essentially a large number of indicator variables (coded [0,1]) reflect traits of the same id across multiple rows. I need to represent the data in a 1 row per id format. I see this as being similar to converting from long to

Re: [R] Subtotals by id for a large number of columns XXXX

2013-10-30 Thread Dan Abner
wrote: Hello, If I understand it correctly, just change mysum to the following. mysum-function(x) tapply(x,d1$id,sum) Hope this helps, Rui Barradas Em 30-10-2013 11:07, Dan Abner escreveu: Hi everybody, I have data in the format of the example data below where essentially a large

Re: [R] Subtotals by id for a large number of columns XXXX

2013-10-30 Thread Dan Abner
, Dan Abner wrote: Hi everybody, I have data in the format of the example data below where essentially a large number of indicator variables (coded [0,1]) reflect traits of the same id across multiple rows. I need to represent the data in a 1 row per id format. I see this as being similar

[R] Recovering object names when using the ... argument in a fn XXXX

2013-10-18 Thread Dan Abner
Hi all, I am using the ... argument to parmeterize a user define fn to accept multiple input objects. I subsquently save all these data as a list. Question: what is the best way to recover or extract the original object names that were fed to the fn? Thanks, Dan [[alternative HTML

Re: [R] Recovering object names when using the ... argument in a fn XXXX

2013-10-18 Thread Dan Abner
] absqrt(c(1, 2, 5)) Cheers, Bert On Fri, Oct 18, 2013 at 9:36 AM, Dan Abner dan.abne...@gmail.com wrote: Hi Bert, Thanks for your response. Please see example below: d1-data.frame(x1=runif(100),x2=runif(100)) d2-data.frame(x3=runif(100),x4=runif(100)) d3

Re: [R] Recovering object names when using the ... argument in a fn XXXX

2013-10-18 Thread Dan Abner
should now work. Sheepishly, -Bert On Fri, Oct 18, 2013 at 10:21 AM, Dan Abner dan.abne...@gmail.com wrote: Hi Bert, Thank you for the code. However, I don't see what I am doing different, but my output is different. I would much rather have output similar to yours where only

[R] Writing an R fn to produce random sequences of binaries XXXX

2013-10-15 Thread Dan Abner
Hi all, I am attempting to write an R fn to produce a random sequence of 8 binaries (4 ordered pairs). I would like to parmeterize the fn so that it takes 2 arguments: 1 that is an overall probability of a 1 vs. 0 and the other which controls the likelihood of 1s on the 1st vs. the 2nd element of

[R] Passing multiple object names to a user-defined R fn XXXX

2013-10-14 Thread Dan Abner
Hi all, I am attempting to write an R fn that will accept multiple (but varying on how many) objects (usually data frames) as inputs and return summary output. What is the best way to pass the object names to the fn (I have thought of 2 options below) AND how do I then use the names inside the

[R] Looping over names of multiple data frames in an R for() loop XXXX

2013-10-11 Thread Dan Abner
Hi everybody, I thought I was using the get() fn correctly here to loop over multiple data frame names in an R for() loop. Can someone advise? miss-c(#NULL!,999) d-c(d1,d2,d3,d4) for(i in 1:4){ + + miss1-ifelse(i=2,miss[1],miss[2]) + miss1 + +

[R] Summary functions in sqldf() XXXX

2013-10-08 Thread Dan Abner
Hi everyone, Is it possible to obtain the 1st 3rd quartiles the median in a sqldf() select statement? If so, can you please provide the summary fn code? Thanks! Dan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Default colors for barplot() XXXX

2013-06-12 Thread Dan Abner
Hi everyone, I have the following call to the barplot() function which produces the desired stacked bar chart. HOWEVER, barplot() chooses 4 different shades of gray for the stacks. If I want to use the legend=NULL argument in combination with a separate call to legend() to customize the legend,

[R] Obtaining the internal integer codes of a factor XXXX

2013-03-25 Thread Dan Abner
Hi everyone, I understand the process of obtaining the internal integer codes for the raw values of a factor (using as.numeric() as below), but what is the best way to obtain these codes for the levels() of a factor (since the as.numeric() results don't really make clear which code maps to which

[R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Dan Abner
Hi everyone, I have the following call to the merge() function. How does one prevent duplicate columns in the resulting data frame that the 2 parent data frames have in common but are not true key or by variables? data3-merge(data1,data2,by=id) data3 id total.x total.y balance 1 78 78 90 2 91

Re: [R] merge function while obviating duplicate columns XXXX

2013-03-11 Thread Dan Abner
Ok, let's say I only want the common columns from data1. Is there a succinct way of doing this for potentially hundreds of in common columns? On Mon, Mar 11, 2013 at 3:25 PM, Ista Zahn istaz...@gmail.com wrote: On Mon, Mar 11, 2013 at 3:17 PM, Dan Abner dan.abne...@gmail.com wrote: Hi

[R] Converting character values to time values when no date information is present XXXX

2012-10-19 Thread Dan Abner
Hi everyone, I am familiar with using the chron package to work with date/time values, but what about just time values with no date info present? What is the best tool to convert character values to time values when no date info is present? Thanks! Dan

[R] Using expression() in plot() XXXX

2012-05-07 Thread Dan Abner
Hello everyone, I am trying to add the following text (in proper notation) to a graphic using expression(). X-bar (with a subscript of cv) = XX. Note: Ideally cv would be a subscript, but it doesn't have to be. I have the following code: text(625,.012,expression(bar(X)cv = 552.01)) Error:

[R] Remove a word from a character vector value XXXX

2012-03-07 Thread Dan Abner
Hi everyone, What is the easiest way to remove the word Average and strip leading and trailing blanks from the character vector (d5.Region) below? .nrow.d5. d5.Region 11 Central Average 22 Coastal Average 33East Average 44

[R] Memory issue. XXXX

2012-03-02 Thread Dan Abner
Hi everyone, Any ideas on troubleshooting this memory issue: d1-read.csv(arrears.csv) Error: cannot allocate vector of size 77.3 Mb In addition: Warning messages: 1: In class(data) - data.frame : Reached total allocation of 1535Mb: see help(memory.size) 2: In class(data) - data.frame :

[R] Inserting a character into a character string XXXX

2012-01-26 Thread Dan Abner
Hello everyone, I have a character vector of 24 hour time values in the format hm without the delimiting :. How can I insert the : immediately to the left of the second digit from the right? mytimes-scan(what=) 1457 1457 1310 1158 137 1855 Thanks! Dan

Re: [R] Inserting a character into a character string XXXX

2012-01-26 Thread Dan Abner
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dan Abner Sent: Thursday, January 26, 2012 6:50 AM To: r-help@r-project.org Subject: [R] Inserting a character into a character string Hello everyone, I have a character vector of 24 hour time values

Re: [R] Inserting a character into a character string XXXX

2012-01-26 Thread Dan Abner
:03   [7] 04:04 00:37 13:20 00:04 02:11 23:20 You could also check that tmp%/%100 (the hour) and tmp%%100 (the minute) are in their expected ranges before calling sprintf. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: Dan Abner [mailto:dan.abne

[R] Writing a function to return column position XXXX

2012-01-24 Thread Dan Abner
Hello everyone, I am writing my own function to return the column index of all variables (these are currently character vectors) in a data frame that contain a dollar sign($). A small piece of the data look like this: can_sta can_zip ind_ite_con ind_uni_con AL 36106 $251,895.80 $22,874.43 AL

Re: [R] Writing a function to return column position XXXX

2012-01-24 Thread Dan Abner
) ) ? regexpr # $ has a special value Michael PS -- Stop with HTML postings (seriously, it actually does mess up what the rest of us see and I think it causes trouble for the archives as well) On Tue, Jan 24, 2012 at 8:49 AM, Dan Abner dan.abne...@gmail.com wrote: Hello everyone, I am writing my

[R] Reading in tab (and space) delimited data within a script XXXX

2012-01-19 Thread Dan Abner
Hello everyone, I use Bob Muenchen's approach for reading in in-stream (to use SAS parlance) delimited data within a script. This works great: mystring - id,workshop,gender,q1,q2,q3,q4 1,1,f,1,1,5,1 2,2,f,2,1,4,1 3,1,f,2,2,4,3 4,2, ,3,1, ,3 5,1,m,4,5,2,4 6,2,m,5,4,5,5 7,1,m,5,3,4,4

Re: [R] Reading in tab (and space) delimited data within a script XXXX

2012-01-19 Thread Dan Abner
(In particular the special behavior of the default sep = ) Thanks for the well-posed question and working data. Michael On Thu, Jan 19, 2012 at 11:37 AM, Dan Abner dan.abne...@gmail.com wrote: Hello everyone, I use Bob Muenchen's approach for reading in in-stream (to use SAS parlance

[R] Using !is.na() in a HAVING clause in sqldf() XXXX

2012-01-17 Thread Dan Abner
Hi everyone, I have the following: sqldf(select Premie,count(tpounds) N,avg(tpounds) Avg_Weight, stddev_samp(tpounds) StdDev from children group by Premie having !is.na(Premie)) sqldf() does not like the !is.na(Premie) specification. How does one exclude a missing group in an aggregated

[R] Merging data XXXX

2012-01-13 Thread Dan Abner
Hello everyone, I have 1 data frame (just a vector in the example below) with 12 individuals listed and a separate vector of 36 days (in week intervals). What is the best way to merge these together so that each individual (specialist here) has all 36 days matched with their specialist number (a

[R] Convert components of a list to separate columns in a data frame or matrix XXXX

2012-01-08 Thread Dan Abner
Hello everyone, What is the most efficient simpliest way to convert all components of a list to separate columns in a matrix? Is there an easy way to programmatically pad the length of the resulting shorter character vectors so that they can be easily combined into a data frame? I have the

[R] Using a mathematical expression in sapply() XXXX

2012-01-04 Thread Dan Abner
Hello everyone, I have the following call to sapply() and error message. Is the most efficient way to deal with this to make sum(!is.na(x)) a function in a separate line prior to this call? If not, please advise. N.Valid=sapply(x,sum(!is.na(x))) Error in match.fun(FUN) : 'sum(!is.na(x))' is

[R] Warning message about closing a connection XXXX

2012-01-04 Thread Dan Abner
Hello everyone, After running the following code, I obtain this error message. mydata - read.table(textConnection(mystring), +header=TRUE, sep=,, +row.names=id, na.strings= ) mydata Warning message: closing unused connection 3 (mystring) = However, when I attempt to run

[R] Merging and subsetting with row names XXXX

2012-01-04 Thread Dan Abner
Hello everyone, I have two questions: 1) I want to create a subset of a data frame column-wise and simultaneously extract the row names into a proper variable. I tried this, but received an error: myleft-mydata[c(id=row.names(mydata),workshop,gender,q1,q2)] Error in `[.data.frame`(mydata,

[R] Passing multiple arguments to a function through sapply() XXXX

2012-01-04 Thread Dan Abner
Hello everyone, How does one pass multiple arguments of a user defined function to that function when called within sapply()? I have the following: myna-function(x,miss.val) {x[x %in% miss.val]-NA;x} mydataNA3-sapply(mydataNA,c(x=myna,miss.val=c(9,99))) Error in match.fun(FUN) : 'c(x =

[R] Extracting from a list XXXX

2012-01-03 Thread Dan Abner
Hello everyone, Can someone please suggest the most succinct method for extracting the first value from each component of a list and saving the resulting vector as a character vector? Thank you, Dan [[alternative HTML version deleted]] __

[R] Applyiing mode() or class() to each column of a data.frame XXXX

2011-12-29 Thread Dan Abner
Hi everyone, I am attempting to use the apply() function to obtain the mode and class of each column in a data frame, however, I am encountering unexpected results. I have the following example data: v13-1:6 v14-c(1,2,3,3,NA,1) v15-c(Good,Bad,NA,Good,Bad,Bad) f4-factor(rep(c(Blue,Red,Green),2))

[R] 2 Y-AXIS labels on the same (left-hand side) Y-AXIS XXXX

2011-11-28 Thread Dan Abner
Hello everyone, Is it possible to specify a 2 line y-axis label on the same lef-hand side y-axis? I am using the \n regular expression, but only the 2nd line appears (I assume the 1st line is printed off the page...) plot(PRE_SHB,R1, main=Figure 1.1: Scatterplot of Residualized Post Score,

[R] R package for segmentation with both continuous and categorical input variables XXXX

2011-11-10 Thread Dan Abner
Hello everyone, Can anyone suggest a decently documented (with good examples in the documentation) R package/function that performs segmentation (cluster, mixture modeling) of a population using both continuous and categorical input variables? Thank you, Dan [[alternative HTML version

[R] Suppress only the x-axis tick mark labels XXXX

2011-10-07 Thread Dan Abner
Hi everyone, How does one suppress only the x-axis tick mark labels (not the tick marks themselves, I want those and the entire y-axis labels and marks) in the plot() fn? thanks! Dan [[alternative HTML version deleted]] __

[R] plot titles and labels XXXX

2011-10-06 Thread Dan Abner
Hi everyone, Is it possible to to specify titles and axis labels on 2 separate lines when using the plot fn? What about tick mark labels? Example of main title: Figure 1: Side-by-side Boxplots of Y by X instead of Figure 1: Side-by-side Boxplots of Y by X

[R] Including only a subset of the levels of a factor XXXX

2011-09-01 Thread Dan Abner
Hello everyone, I have the following factor: levels(pp_income) [1]1 2 3 4 5 6 7 [9] 8 9 Renter I want to subset so that only values 1:9 are included. I have the following: income-pp_income[pp_income %in% c(1:9)] levels(income) [1]1

[R] Creating ODS RTF-style output in R XXXX

2011-08-29 Thread Dan Abner
Hello everyone, I have been using the sink() function as follows: x-rnorm(100) sink(C:\\Users\\dan\\Desktop\\Current Events\\myhw.txt, append=TRUE,split=TRUE) m1-c(Mean=mean(x),SD=sd(x),Min=min(x),Max=max(x)) m1 sink() === Is it possible to create tabular style output very much like the ODS

[R] Counting non-missing values XXXX

2011-08-27 Thread Dan Abner
Hello everyone, What is the most elegant and efficient way to count non-missing values of a vector? Thanks! Dan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Placing a column name in a variable XXXX

2011-08-27 Thread Dan Abner
Hi everyone, How does one place an object name (in this case a vector name) into another object (while essentially masking the values of the first object? For example: JOBSAT-rnorm(40) CI-function(x,alpha){ + result-cbind(x,mean=mean(x),alpha) + print(result) + } CI(JOBSAT,.05) I want this

[R] Importing data from MS EXCEL (.xls) to R XXXX

2011-08-24 Thread Dan Abner
Hello everyone, What is the simplest, most RELIABLE way to import data from MS EXCEL (.xls) format to R? In the past I have used the read.xls() function from the xlsReadWrite package, however, I have been wrestling with it all afternoon long with no success. I continue to receive the following

[R] Plot fn, xlim when x is a date. XXXX

2011-07-17 Thread Dan Abner
Hello everyone, I have the following x variable: DATE-as.Date(as.character(data12$DATE),%m/%d/%Y) This works fine, however, I want to plot multiple years of data on separate plots by month. All years have all 12 months data except 2011; HOWEVER I need the x axis limits to remain the same. I

[R] R function that returns an object's search path position XXXX

2011-05-15 Thread Dan Abner
Hello everyone, Is there an R function that returns an object's search path position? Thank you, Dan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] %in% operator - NOT IN

2011-05-08 Thread Dan Abner
Hello everyone, I am attempting to use the %in% operator with the ! to produce a NOT IN type of operation. Why does this not work? Suggestions? data2[data1$char1 %in% c(string1,string2),1]-min(data1$x1) data2[data1$char1 ! %in% c(string1,string2),1]-max(data1$x1)+1000 Error: unexpected '!' in

[R] Conditional values of a vector XXXX

2011-05-08 Thread Dan Abner
Hello everyone, Below is a metadata summary of raw data in a data frame (which itself is a data frame). I want to add 2 columns to the data frame below that will contain the min and max for integer and numeric class columns and NA for factors and character vectors. Can anyone suggestion the most

Re: [R] Evaluating a multivariable function XXXX

2011-05-07 Thread Dan Abner
Hello everyone, I have the following R code for a multivariable function: fn2-function(x,y,z){(y+2*z)/(5*y-x*z)} fn2(-5,-2,3) [1] 0.8 No problems. === If, however, I call the function using a vector substitution for the arguments, R sees this as 3 separate calls to the

[R] Printing a title for an object in the console when writing a function XXXX

2011-05-07 Thread Dan Abner
Hello everyone, What is the best way to have R print a title and then skip a line (both without the [1] line preffix) when writing a function that prints an object (to the console)? Simplified example: fn3-function(x,y){ c1-cov(x,y) print(c1)} data1-data.frame(age=rnorm(50),weight=rnorm(50))

[R] Options for print()

2011-05-05 Thread Dan Abner
Hello everyone, I have a few questions about the print() fn: 1) I have the following code that does not center the character string: print(The TITLE,quote=FALSE,justify=center) 2) How can I get R to not print the leading [1], etc. when using print()? (Sorry, I don't know what the leading [1]

[R] SAPPLY function XXXX

2011-05-04 Thread Dan Abner
Hello everyone, I am attempting to write a function to count the number of non-missing values of each column in a data frame using the sapply function. I have the following code which is receiving the error message below. n.valid-sapply(data1,sum(!is.na)) Error in !is.na : invalid argument

Re: [R] SAPPLY function XXXX

2011-05-04 Thread Dan Abner
Perfect Erik! Thank you! On Wed, May 4, 2011 at 4:22 PM, Erik Iverson er...@ccbr.umn.edu wrote: Dan, I am attempting to write a function to count the number of non-missing values of each column in a data frame using the sapply function. I have the following code which is receiving the

[R] Obtaining the name of an object XXXX

2011-05-04 Thread Dan Abner
Hello everyone, How does one write a function to return the name of an input object (that is assumed to be a data frame) as a character string? I tired using the get(), but this does not work as I had hoped. For example: myfn-function(x){ output-data.frame(Attribute=Data Set

[R] IFELSE function XXXX

2011-04-05 Thread Dan Abner
Hello everyone, This IFELSE function call is not working properly. I do not receive an error message, but the actions are not executed conditional as I was hoping. Any assistance is appreciated. set.seed(12345) res1-rbinom(1,1,.1) rdata3-transform(data.frame(res1),input1=rnorm(1,50,10))