similar to: how to subtract one string from another in R

Displaying 20 results from an estimated 400 matches similar to: "how to subtract one string from another in R"

2011 Feb 10
2
for loop to merge .csvs
So I needed to merge 17 .csv files, and did so by brute force, but I might need to do so again. Anyone have suggestions for a for loop that might do the below for me (where a:r are separate .csv files) ab<-merge(a,b,all=TRUE) cd<-merge(c,d,all=TRUE) ef<-merge(e,f,all=TRUE) gh<-merge(g,h,all=TRUE) ij<-merge(i,j,all=TRUE) kl<-merge(k,l,all=TRUE) no<-merge(m,n,all=TRUE)
2011 Apr 10
4
Password-protect R script files
There was a question in R forum very long time back.. on how to protect R Script files from inadvertent editing by users. There is a way to do this from within R, atleast in Windows XP I have tried this and it certainly works , The method is very different from the OS based folder protection route, however making available such a method in the open forum would only kill the very spirit of R.
2011 Aug 04
2
random value generation with added constraint.
Hi I am looking at generating a random dataset of say 100 values fitting in a normal distribution of a given mean and SD, I am aware of rnorm function. However i am trying to build into this function one added constraint that all the random value generated should also obey the constraint that they only take values between say X to X+25 How do i do this in R? Any help would be highly appreciated,.
2012 Nov 15
3
GUI Development reg
Dear R Group I have a character vector from which I want to select a few elements and create a new character vector. I need a GUI to do this in R Script. Can someone help? a<-c("A","B","C","D","E") ## I want to have a GUI in R that will display elements in "object a" as a drop down list.. from there I want to be able to select a
2012 Feb 27
1
win zip archive of library(HH) for R2.12.0
Dear R Group Can any body point me to a link from where I can get zip archive of the package HH for R 2.12.0? Thanks & Regards Vijayan Padmanabhan "What is expressed without proof can be denied without proof" - Euclide. Please visit us at www.itcportal.com ****************************************************************************** This Communication is for the exclusive use
2017 Jul 13
2
Help with R script
Using Ulrik?s example data (and assuming I understand what is wanted), here is what I would do: ex.dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") tst <- data.frame(x = ex.dat, stringsAsFactors=FALSE) sp <- strsplit(tst$x, ':', fixed=TRUE) chk <-
2010 Sep 22
2
randomForest - partialPlot - Reg
Dear R Group I had an observation that in some cases, when I use the randomForest model to create partialPlot in R using the package "randomForest" the y-axis displays values that are more than -1! It is a classification problem that i was trying to address. Any insights as to how the y axis can display value more than -1 for some variables? Am i missing something! Thanks Regards
2017 Jul 13
2
Help with R script
Dear R-help Group Scenario 1: I have a text file running to 1000 of lines...that is like as follows: [922] "FieldName: Wk3PackSubMonth" [923] "FieldValue: Apr" [924] "FieldName: Wk3PackSubYear" [925] "FieldValue: 2017" [926] "FieldName: Wk3Code1" [927] "FieldValue: " [928] "FieldValue: K4" [929] "FieldName:
2011 Apr 02
4
help
Dear R Help group I need to run a command line script from within R session. I am not clear how i can acheive this. I tried shell and system function, but i am missing something critical.can someone provide help? My intention is to create a pdf file of a plot in R and then attach existing files from my system as attachment into the newly created pdf file. Any help would be greatly appreciated..
2010 Sep 07
1
Help with repeating values in a column of dataframe in R on a random pattern- reg
Dear Group I have to populate a column in a R dataframe containing say 99 rows, where for every 3 row one row (randomly determined) of the column should take the value 1 and the other 2 row of that column should take the value 0. I used the command dataframe$new<-rep(sample(c(0,1,0),3,replace=FALSE),99) This command repeats the same patter of response across the entire column.. I would
2012 Feb 14
1
help with matrix column cleaning
Dear R Group I have a matrix object in R, where i want to retain only those columns which have each row from a different group.. see the example below.. team1<-c("a1","a2","b1","b2","b3","c1","c2") teams<-combn(team1, 3) I want a function which will delete all columns in the teams matrix that have more than 1 row
2017 Jul 14
0
Help with R script
@Don your solution does not solve Vijayan's scenario 2. I used spread and gather for that. An alternative solution to insert mising Fval - picking up with Don's newtst - is newtst <- c("FName: fname1", "Fval: Fval1.name1", "FName: fname2", "Fval: Fval2.name2", "FName: fname3", "FName: fname4", "Fval: fval4.fname4")
2011 Jun 04
1
library(SenoMineR)- Triangle Test Query
Dear R Group I was trying to use the triangle.test function in SensoMineR and strangely i encounter a error in the output of preference matrix from the analysis. To illustrate, pl see the following dataframe of a design with the response and preference collected as shown below: design<-structure(list(`Product X` = c(3, 1, 4, 2, 4, 2, 1, 3, 4, 2, 4, 2, 1, 3, 4, 2, 4, 2, 3, 1), `Product Y` =
2017 Jul 13
0
Help with R script
Hi Vijayan, one way going about it *could* be this: library(dplyr) library(tidyr) library(purrr) ex_dat <- c("FName: fname1", "Fval: Fval1.name1", "Fval: ", "FName: fname2", "Fval: Fval2.name2", "FName: fname3") data.frame(x = ex_dat) %>% separate(x, c("F1", "F2"), sep = ": ") %>% filter(F2
2007 Apr 12
9
taille de caractère
en fait je vous renvoi ce message car maintenant la taille de la police change au bout de 500 lignes environ, alors que j''avais reussi à garder la taille jusqu''à environ 5000 lignes. Je ne comprend pas. Est-ce que c''est instable? le bout de code que vous m''avez envoyer ne marche pas. merci Sebastien _______________________________________________ wxruby-users
2003 Feb 21
4
Perl question
I'm working on the installer code, but I don't know Perl well enough. What is a good Perl equivalent of the R statement if ( s %in% c('string1', 'string2', 'string3') ) ... I can do it with if (s == "string1" || s == "string2" || s == "string3") ... but I've got a feeling there's a better way to do it using associative
2004 Dec 02
3
combine two strings
Hello, I would like to combine two strings while using R. For instance, string1 <- "abcde" string2 <- "WXYZ" I'd like to combine string1 and string2 into Sting3; and string3 should be "abcdeWXZY". Would you please tell me how to do it? Thank you very much Ben-Yang [[alternative HTML version deleted]]
2017 Mar 18
5
AD integration not working after move/version
Hi! I am in a bit of trouble, I have moved a samba installation from one virtual host to another keeping the configuration files and filesystems. But during the transition something broke, now windows users are no longer able to access their shares. I think it has to do with the AD integration. I do not know it it because some state is missing on this host related to the AD integration or if
2010 May 17
1
Query on linear mixed model
Hi R Forum I am a newbie to R and I have been amazed by what I can get my team to accomplish just by implementing Scripting routines of R in all my team's areas of interest.. Recently i have been trying to adopt R scripting routine for some analysis with longitudanal data.. I am presenting my R script below that I have tried to make to automate data analysis for longitudanal data by employing
2011 May 26
1
dataframe - column value calculation in R
Dear RGroup I have a requirement for which I am seeking help. I am looking at automating the last column calculation through R when having the data of the other columns as a dataframe, In excel I can do using the formula function as given below, however, hereagain for the number of observations that come under control, I need to write the formula seperately for each cell and then I can block