similar to: How to translate string to variable inside a command in an easy way in R

Displaying 20 results from an estimated 500 matches similar to: "How to translate string to variable inside a command in an easy way in R"

2011 Jul 04
4
How to build a matrix of number of appearance?
I have a matrix of claims at year1 that I get simply by claims<-read.csv(file="Claims.csv") qq1<-claims[claims$Year=="Y1",] I have MemberID and ProviderID for every claim in qq1 both are integers An example for the type of questions that I want to answer is how many times ProviderID number 345 appears together with MemberID 23 in the table qq1 In order to answer
2012 May 09
1
QQplots format
Dear R help, I tried to plot two qq plots in the same window using the code below.? Somehow it is plotting only one at a time.?? I borrowed the print function from xyplot. ? pdf("QQplotCorrUncorr.pdf") qq1<-qqPlot(residuals(fm), main="QQ plot for Correlated Model") qq2 <-qqPlot(residuals(fma), main="QQ plot for Uncorrelated Model") print(qq1, pos = c(0.0,
2004 Oct 26
1
help!!!
Dear R users, Would need some help. I will compare some results in a dotplot. The picture is very dark(grey) in the background, could I get it ligther? R-code dotplot(LINES~VAL, groups=QQ,key=simpleKey(levels(QQ1),space="top"),xlab="Values",main="Tail-Measure" ) (where LINES,VAL, QQ is vectors)
2007 Jan 23
1
How to generate 'minor' ticks in lattice (qqmath)
Dear group, I tried to generate labels for every second tick in lattice (qqmath). Version: 0.14-16 Date: 2006/12/01 R version 2.4.1 (2006-12-18) An example: library(lattice) numy=100 y=runif(numy,min=0,max=1) sig=0.05 numsig=length(which(y<sig)) tck.no=11 # number of ticks tcks=1:tck.no labl=as.character(0.1*tcks-0.1) # label for all ticks labl[seq(2,tck.no-1,2)]="" # delete
2008 May 06
1
check_friendship method only returning value of last pair
Hello, I''m new to facebooker and ruby, so not sure if the issue I am having is due to my misunderstanding or a bug in facebooker plugin. Here is what I have: def show @current_user ||= facebook_session.user @member ||= params[:id].to_s==@current_user.id.to_s ? @current_user : Facebooker::User.new(params[:id]) #for each of current_user''s friends, check if they are
2006 Mar 26
2
Shared Columns in an STI
I have a an STI table which acts_as_tree, that has a large number of classes/types. My common fields are: id parent_id name description with 4 more text fields, I could cover most of my classes if I could redefine the name of the field like this. text1 AS address1 text2 AS address2 text3 AS zipcode For one class and text 1 AS model_number text2 AS vendor Is there a construct that will allow
2009 Oct 26
1
regular expressions
Dear list, I have the following text to parse (originating from readLines as some lines have unequal size), st = c("START text1 1 text2 2.3", "whatever intermediate text", "START text1 23.4 text2 3.1415") from which I'd like to extract the lines starting with "START", and group the subsequent fields in a data.frame in this format: text1 text2
2009 Sep 04
2
transforming a badly organized data base into a list of data frames
Dear R-ers! I have a badly organized data base in Excel. Once I read it into R it looks like this (all variables become factors because of many spaces and other characters in Excel):
2006 Dec 09
1
manipulate headers?
Hi... Here''s a working Perl script that I want to be able to do in Ruby: use WWW::Mechanize; my $url = "http://host/tt?name=chris"; my $mech = WWW::Mechanize->new(); $mech->add_header( Referer => "http://chrismcmahonsblog.blogspot.com" ); $mech->add_header( Cookie => "messageid=170118; memberid=1007"); $mech->get($url) so the header
2009 Sep 06
1
struggling with "split" function
I am very sorry for such a simple question, but I am struggling with "split". I have the following data frame: x<-data.frame(A=c(NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA,"split",NA,NA,NA,NA),
2013 Jan 27
2
Unexpected behavior with abbreviation of an argument to paste
R 2.15.1 OS X Colleagues, I encountered the following unexpected behavior today: The following command yielded the expected result: paste(c("TEXT1", "TEXT2"), collapse="|") Result: [1] "TEXT1|TEXT2" However, abbreviating "collapse" by even one character: paste(c("TEXT1", "TEXT2"), collaps="|") yielded the
2012 Feb 09
3
Rearanging Data
Hi, This is only a small portion of the Data i am working on I want to make a subset of this data set( Data Set=Claims) MemberID ProviderID Vendor PCP Year Specialty 1 42286978 8013252 172193 37796 Y1 Surgery 2 97903248 3316066 726296 5300 Y3 Internal 3 2759427 2997752 140343 91972 Y1 Internal 4 73570559
2009 Oct 20
1
plotting labels (not values) on xy plot
I have 2 vectors, x and y and have done an xy plot. I want to plot the label (name?) of the vector on the plot rather than the value. text(x,y, labels = x) gives me the value of x. text(x,y, labels = labels(x)) gives me something like c("text1","text2"..) plotted for each point text(x,y, labels = names(x)) gives nothing print(x) gives me [,1] text1
2017 Sep 28
2
Searching for Enumerated Items using str_count() from the stringr package
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, opts_regex = opts(pattern)) : Syntax error in regexp pattern. (U_REGEX_RULE_SYNTAX) === Here is
2008 May 24
2
How to pass variable of for loop on read table text
Hi, I have a couple of text and would like to automate of reading these multiple files using (namely; text1.txt, text2.txt....) for(y in 3:10){ data$y<-read.table('text$y.txt')} But it seems not allow. Any idea? Thanks. [[alternative HTML version deleted]]
2010 Jul 01
4
possible to plot number line in R?
Hallo! Is there a possibility to plot a number line in R? I would like to display 3 different Intervals on the same number line. Ideally, it would be possible to add a name to each number (e.g. Interval 1, lower cut-off...and so on). I have not found a command for this. Thank you for your help. Julia [[alternative HTML version deleted]]
2005 Sep 08
1
Converting a matrix to a dataframe: how to prevent conversion to factor
Colleages I am running R 2.1.0 on a Mac (same problem occurs in Linux). In some situations, I have mixed text/numeric data that is stored as characters in a matrix. If I convert this matrix to a dataframe, the numeric data becomes factors, not what I intend. TEXT <- paste("Text", 1:4, sep="") NUMBERS <- 10 + 4:1 MATRIX <- cbind(TEXT,
2020 Nov 18
1
LTO with Linker Scripts
On 2020-11-18, Teresa Johnson via llvm-dev wrote: >AFAIK this effort stalled when Tobias changed jobs. Adding Sergei who may >know the current status of the support within Qualcomm. > >Teresa > >On Wed, Nov 18, 2020 at 11:12 AM Mitra, Gaurav via llvm-dev < >llvm-dev at lists.llvm.org> wrote: > >> Hello All, >> >> >> >> I’d like to pick up
2000 Nov 07
2
par(las=.) gives wrong "adj" for mtext() (PR#726)
For R Version 1.1.1 and R-devel (Linux)... Sorry, there's no time to fix myself now {e.g., after starting a new device} : par(las=3); plot(1:10); par(las=1) ; mtext("mtext") Gives a left-adjusted (as for adj = 0) mtext, even if par("adj") is still 0.5 Note that I'm also not convinced that mtext() should follow par("las") as it does in the
2008 Jan 11
1
Remote form for, Form.serialize and parameter arrays
Whenever I use regular form for and have an attribute list containing an array all goes fine and it results in parameters like: {"some_attributes"=>[{"title"=>"first_title", "text" => "text1"}, {"title"=>"second_title", "text"=>"text2"}]} However whenever I submit the same form with