geomoose | still active. Current development | Build Tool library
kandi X-RAY | geomoose Summary
kandi X-RAY | geomoose Summary
This is the readme file for GeoMOOSE MS4W package. If you haven't installed this application yet, please read the approriate INSTALL file for installation instructions.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of geomoose
geomoose Key Features
geomoose Examples and Code Snippets
Community Discussions
Trending Discussions on geomoose
QUESTION
I am having an issue with some R code. I am trying to classify text values from a column into a new column. My data is a collection of tags used on the gis.stackexchange site, which has ~2,500 rows. My goal is to classify the tags as either COTS, FOSS, or other. Reviewing the tags there are two "scenarios"; tags that are used once (i.e. anaconda) and tags that have a term used multiple times (i.e. qgis, qgis-desktop, qgis-server, etc.). This scenario is true for both COTS and FOSS tags.
My approach was to do the following:
- create a vector with all tags that represent FOSS
- create a vector with all tags that represent COTS
- create a new column called software and code using ifelse
- ifelse - where the tagName is %in% FOSS then code as FOSS
- in the ifelse use grep on the FOSS vector to pattern match tags that may be used multiple times (i.e. qgis) and code as FOSS
- Repeat this for COTS
I am getting an issue where the last grep (COTS) is being coded as FOSS. Obviously there is something wrong, but I cannot seem to figure out the issue. Below is the code and a link to the source data.
Tag vectors -- FOSS and COTS
...ANSWER
Answered 2018-Sep-19 at 13:19Two things. First of all, you need grepl()
because of the logical output. Secondly, grepl()
does not work with a character vector, therefore you need to collapse it like this "anaconda|android|..."
and omit the fixed = TRUE
to work.
This should do it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install geomoose
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page