similar to: Reading data entered within an R program

Displaying 20 results from an estimated 100 matches similar to: "Reading data entered within an R program"

2006 Nov 25
3
Multiple Conditional Tranformations
Greetings, I'm learning R and I'm stuck on a basic concept: how to specify a logical condition once and then perform multiple transformations under that condition. The program below is simplified to demonstrate the goal. Its results are exactly what I want, but I would like to check the logical state of gender only once and create both (or any number of) scores at once.
2012 Jan 19
2
Reading in tab (and space) delimited data within a script XXXX
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 8,2,m,4,5,5,5" mydata <- read.table( textConnection(mystring),
2006 Dec 15
1
Switching labels on a factor
Hi All, I'm perplexed by the way the unclass function displays a factor whose labels have been swapped with the relevel function. I realize it won't affect any results and that the relevel did nothing useful in this particular case. I'm just doing it to learn ways to manipulate factors. The display of unclass leaves me feeling that the relevel had failed. I've checked three books
2006 Dec 18
1
Applying variable labels across a data frame
Hi All, I'm working on a class example that demonstrates one way to deal with factors and their labels. I create a function called myLabeler and apply it with lapply. It works on the whole data frame when I subscript it as in lapply( myQFvars[ ,myQFnames ], myLabeler ) but does not work if I leave the [] subscripts off. I would appreciate it if anyone could tell me why. The program below
2009 Dec 09
4
Need help/suggestions for DialPlan
I am revising our DialPlan strategy for our Asterisk system (1.4.2) and looking for some info on 'best practices' for this. Here's what I'm trying to do: I have an ACD menu that gives the caller the options as follows: - Press 1 for sales - Press 2 for support - Press 3 for customer service - Press 8 for a 'Dial by Name' list or enter the extension number at anytime
2012 Oct 25
2
How to extract auc, specificity and sensitivity
I am running my code in a loop and it does not work but when I run it outside the loop I get the values I want. n <- 1000; # Sample size fitglm <- function(sigma,tau){ x <- rnorm(n,0,sigma) intercept <- 0 beta <- 0 ystar <- intercept+beta*x z <- rbinom(n,1,plogis(ystar)) xerr <- x + rnorm(n,0,tau) model<-glm(z ~ xerr, family=binomial(logit))
2008 Apr 14
3
Power curves
Hi, I am trying to create a power curve to show how the power of a t-test varies depending on the mean. Any ideas how I should go about this? Louisa _________________________________________________________________ [[alternative HTML version deleted]]
2012 Oct 28
2
List of arrays - problem with dimensions
Dear all, I want to obtain the following result [[1]] , , 1, 1 [,1] [,2] [1,] 1 1 [2,] 1 1 , , 2, 1 [,1] [,2] [1,] 1 1 [2,] 1 1 ................ , , 9, 1 [,1] [,2] [1,] 1 1 [2,] 1 1 , , 10, 1 [,1] [,2] [1,] 1 1 [2,] 1 1 [[2]] , , 1, 1 [,1] [,2] [1,] 1 1 [2,] 1 1 , , 2, 1 [,1] [,2] [1,] 1
2010 Jan 13
3
Updated comparison table for SAS-SPSS Add-ons and R Functions
Hi All, I have substantially expanded the table that compares SAS and SPSS add-on modules to somewhat equivalent R packages. This new version is at: http://r4stats.com/add-on-modules and I would very much appreciate any feedback you might have on it. The site http://r4stats.com is the replacement to http://RforSASandSPSSusers.com and includes the support files for both "R for SAS and SPSS
2008 Nov 02
0
R Textbook for SAS and SPSS Users
Dear Lists, I got the chance to review Bob Muenchen's book - R for SAS and SPSS users. While my detailed review is online at www.decisionstats.com, the book is a welcome addition in R Textbooks for beginners and an especially nice one for people who have experience in SAS and /or SPSS languages. AT 50 USD, it's reasonably priced for all geographies (;) , and quite handy as a refernce book
2009 Nov 25
3
Feature request for as.Date() function
Hello - I have a csv file with a few date columns. Some of the records have an "NA" character string instead of the date. When I attempt to use read.csv() and typecast the columns using colClasses, I receive the following error: Error in charToDate(x) : character string is not in a standard unambiguous format Similarly, the following command produces the same error:
2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order correlations---however I'd like to modify it so that it can generate a fifth vector with specific partial
2009 Jan 07
0
R in the NY Times-IAsians perspective
R and its GUI Rattle helped me establish a data mining consulting startup on my own, without taking bank credit . People I met on the forum and especially books like rforsasandspssusers.com/ <http://rforsasandspssusers.com/> helped me ease the transition to the new Object Oriented method from the earlier - even a monkey can create shakespeare if he types enough kind of analytics software.
2012 Oct 20
1
Logistic regression/Cut point? predict ??
I am new to R and I am trying to do a monte carlo simulation where I generate data and interject error then test various cut points; however, my output was garbage (at x equal zero, I did not get .50) I am basically testing the performance of classifiers. Here is the code: n <- 1000; # Sample size fitglm <- function(sigma,tau){ x <- rnorm(n,0,sigma) intercept <- 0 beta
2009 Jun 09
2
Comparing R and SAs
Hi: For those of you who are adept at both SAS and R, I have the following questions: a) What are some reasons / tasks for which you would use R over SAS and vice versa? b) What are some things for which R is a must have that SAS cannot fulfill the requirements? I am on the ramp up on both of them. The general feeling that I am getting by following this group is that R updates to the product are
2013 Sep 04
3
Fwd: Bienvenido a la lista de distribuciĆ³n R-help-es
Hola Jose, si CONCATENAR significa APILAR, es decir, concantenar verticalmente, por decirlo de algun modo, podrias hacerlo con rbind(): nuevovector <- rbind(vector1,vector2) Si ademas quieres que cada valor de los vectores originales sea identificado en el nuevovector, puedes usar: nuevovector <- stack(vector1,vector2) en este ultimo caso se agrega una columna adicional tipo factor, con
2013 Nov 19
2
Communicate with barge agent
HI folks, I have set a barging facility with our production box.Client able to barge a agent but client raise a requirement, they want talk to barge agent but that communication is not listen by customer. It is possible with asterisk or not. thanks in advance. Regards Akhilesh -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Jun 14
2
Which application to open Zap channel?
I'm sure this a very common and easy thing to do with Asterisk, but for the life of me I can't find the application that will allow me to open a Zap channel. Real world example: To be able to connect to an open Zap channel, so it would allow me to say, join in on a call that was originally answered by a PSTN phone (ie. just like you would by simply picking up another PSTN phone..!).
2010 Nov 15
2
rotate column names in large matrix
Dear List, I have a large (1600*1600) matrix generated with symnum, that I am using to eyeball the structure of a dataset. I have abbreviated the column names with the abbr.colnames option. One way to get an even more compact view of the matrix would be to display the column names rotated by 90 degrees. Any pointers on how to do this would be most useful. Any other tips for displaying the
2008 Sep 06
3
new to R
hi im starting with R.....have no idea to start...plz help -- View this message in context: http://www.nabble.com/new-to-R-tp19342903p19342903.html Sent from the R help mailing list archive at Nabble.com.