similar to: creating a derived variable in a data frame

Displaying 20 results from an estimated 10000 matches similar to: "creating a derived variable in a data frame"

2017 Sep 07
2
ISO3 code to 7 continents names
df is a data frame consisting of one variable (iso3 codes) such as USA RUS ARG BGD ITA FRA Some of these iso3 codes are repeated and I would like the corresponding continent name, the countrycode package does not seem to distinguish between North and South America. Thanks. Sincerely, Milu On Thu, Sep 7, 2017 at 9:00 PM, David Winsemius <dwinsemius at comcast.net> wrote: > > >
2017 Sep 07
3
ISO3 code to 7 continents names
Dear all. Is it possible to convert.identify iso3 country names to the seven continent names? # Asia, Africa, Antarctica, Australia, Europe, South America, and North America, I have tried the following: ### region <- merge(countryExData,df,by.x='ISO3V10',by.y='iso3') where df is the name of my dataset with iso3 the identification variable but there seems to be a a lot of
2017 Sep 07
0
ISO3 code to 7 continents names
> On Sep 7, 2017, at 12:21 PM, Miluji Sb <milujisb at gmail.com> wrote: > > df is a data frame consisting of one variable (iso3 codes) such as > > USA > RUS > ARG > BGD > ITA > FRA > > > Some of these iso3 codes are repeated and I would like the corresponding continent name, the countrycode package does not seem to distinguish between North and
2008 Sep 11
2
database table merging tips with R
I have not devoted time to setting up ROracle since binaries are not available and it seems to require some effort to compile (see http://cran.r-project.org/web/packages/ROracle/index.html). On the other hand, RODBC worked more or less magically once I set up the data sources. What is your success using ROracle and why would it be preferable to RODBC ? -Avram On Thursday, September 11,
2009 May 04
1
mosaic plot with two factors and one continous variable
Hello, my dataset is already aggregated: I have two categorical variables, say "continent" and "country" and one non-negative metric variable "population". Now I would like to produce a mosaic plot which uses "population" to determine how large each area of the plot is. In other words, I fail to find out - how to use the mosaic function of the vcd package
2017 Sep 07
0
ISO3 code to 7 continents names
> On Sep 7, 2017, at 11:36 AM, Miluji Sb <milujisb at gmail.com> wrote: > > Dear all. > > Is it possible to convert.identify iso3 country names to the seven > continent names? > > # Asia, Africa, Antarctica, Australia, Europe, South America, and North > America, > > I have tried the following: > > ### > region <-
2009 Apr 29
2
help converting for loop to vector operation
Dear List, I have a wrapper function that draws a graph that I'd like to use in a vector-like manner. The for-loop version I currently use is below. library(ggplot2) data(economics) h <- 600 w <- 800 #---------------------------------------------------------- draw_metric_by_date <- function( df, i, smooth=FALSE, BASEPATH ) { mlabel <- names(df)[i] qmetric
2008 Dec 03
3
Help with maps
A few questions about maps... (1) How can I find a listing of the internal data sets that map() from the maps library contains? For example, "usa", "county", "state", "nz" all work. Are there any others? (2) Is there an easier, more generalized way to produce this (http://www.ai.rug.nl/~hedderik/R/US2004/ ) type of plot than this
2008 Aug 21
2
Large data sets with R (binding to hadoop available?)
Dear R community, I find R fantastic and use R whenever I can for my data analytic needs. Certain data sets, however, are so large that other tools seem to be needed to pre-process data such that it can be brought into R for further analysis. Questions I have for the many expert contributors on this list are: 1. How do others handle situations of large data sets (gigabytes, terabytes)
2008 Oct 24
7
combining data from different datasets
Hi, I have two tables: > iso continent code code3 codenum country 1 EU AD AND 20 Andorra, Principality of 2 AS AE ARE 784 United Arab Emirates 3 AS AF AFG 4 Afghanistan, Islamic Republic of 4 NA AG ATG 28 Antigua and Barbuda 5 NA AI AIA 660
2006 Sep 29
1
newbie Q: it won't display foreign keys...
I have two tables CREATE TABLE continents ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE countries ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, continent_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I generate scaffolds for country and for
2008 Jun 27
6
African IP addresses list
Hi all, I am trying to block all IP addresses from Africa due to a high rate of fraudulent orders coming from them. I have some found some websites that can generate a range of IP addresses. However, you would have to enter the ranges by country. I can use those perhaps but that would mean I would have to get the ranges for each country one by one. Has anyone here a list of addresses from
2009 Feb 26
1
bottom legends in ggplot2 ?
Has anyone had success with producing legends to a qplot graph such that the legend is placed on the bottom, under the abcissa rather than to the right hand side ? The following doesn't move the legend: library(ggplot2) qplot(mpg, wt, data=mtcars, colour=cyl, gpar(legend.position="bottom") ) I am using ggplot2_0.8.2. Thanks in advance, Avram
2007 Aug 21
2
divided scatter plots
I have a data set which contains two columns. The first column is a list of countries, and the second column contains their political risk ratings. I would like to create one large plot that contains 5 different sections, each with a scatter plot. To clarify, I have divided the countries into 5 groups. For each group (continent), I would like to have the name of the continent on the x-axis, and
2009 Jul 31
1
Using R with Hadoop/Hive for Big Data
Hive <http://hadoop.apache.org/hive/> is a data warehouse infrastructure built on top of Hadoop that provides tools to enable easy data summarization, adhoc querying and analysis of large datasets data stored in Hadoop files. It provides a mechanism to put structure on this data and it also provides a simple query language called QL which is based on SQL and which enables users familiar with
2009 Aug 04
2
"na.strings" and the like; suspending interpretation of "NA"
Can someone point me to the proper place in the documentation or on the Wiki where I can learn how to get R to stop interpreting the string "NA" as something special? I have a table in a database which contains (among other things) country codes and continent codes. The standard set of two-letter codes includes "NA" to denote "North America". I learned of the
2005 Apr 24
2
A question on the library lme4
Hi, I ran the following model using nlme: model2<-lme(log(malrat1)~I(year-1982),random=~1|Continent/Country,data=wbmal10) I'm trying to run a Poisson GlMM to avoid the above transformation but I don't know how to specify the model using lmer in the lme4 library: model3<-lmer((malrat1)~I(year-1982) + ??,data=wbmal10,family=poisson) How can I introduce a random factor of the
2008 Mar 22
4
Ajax.Updater not fully work in IE7
My code snapshot: correct work in FF , Opera and Safari, but in IE7 - isn''t return result <form action="test.php" method="POST"> <div id="country" style="border: 1px solid #ccc; width: auto"></div> <br/> <a href="javascript:getTest()">test</a> </form> <script
2006 Mar 07
1
decorators for models?
Hi! I''m thinking of implementing datagrid like functionality for showing data (models) in grids so that I don''t have to re-invent the view/controller for each table I need. There are number of parameters that need to be customizable: column titles, row style depending on the data (i.e. showing all rows with balance<0 in red), is column sortable, sort-algorithm etc. To
2005 Jan 14
1
how to produce 2-d color plots in R
Hello 'R' Users, I am very new on 'R', so excuse me if I ask something wrong. I have ASCII data and the colums of the data are looks like :- !------------------------- time,yr,mo,dy,hr,min,sec,lat,lon,ht,co2obs,sigma,co2model -- - -- !---------------------------- Each column has data value. Now I want to produce 2-d color maps, for example the plot should look like :- on