Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN R!!! Write a function named month_convert(x, from_lang, to_lang) that will convert month names from one language to another. The function will accept three arguments:

IN R!!!

Write a function named month_convert(x, from_lang, to_lang) that will convert month names from one language to another. The function will accept three arguments: x, which is a factor with month information; the language from which we are tranlating from_lang; and the language to which we are translating to_lang.

For example:

x <- factor(c("March","March","February","June"))

month_convert(x,"English","Spanish")

will output:

[1] marzo marzo debrero junio

Levels: febrero junio marzo

If the input contains a value that is not a real month, then it will be replaced with NA

x <- factor(c("March","March","February","June","Jaly"))

month_convert(x, "English", "Spanish")

[1] marzo marzo febrero junio

Levels: febrero junio marzo

here is the txt:

m1 m2 m3 m4 m5 m6 m7 English January February March April May June July Czech leden nor brezen duben kveten cerven cervenec Danish januar februar marts april maj juni juli Dutch januari februari maart april mei juni juli Finnish tammikuu helmikuu maaliskuu huhtikuu toukokuu keskuu heinkuu French janvier fvrier mars avril mai juin juillet German Januar Februar Mrz April Mai Juni Juli Hungarian janur februr mrcius prilis mjus jnius jlius Icelandic janar febrar mars aprl ma jn jl Italian gennaio febbraio marzo aprile maggio giugno luglio Norwegian januar februar mars april mai juni juli Polish styczen luty marzec kwiecien maj czerwiec lipiec Portuguese janeiro fevereiro maro abril maio junho julho Spanish enero febrero marzo abril mayo junio julio Swedish januari februari mars april maj juni juli Turkish ocak subat mart nisan mayis haziran temmuz m8 m9 m10 m11 m12 English August September October November December Czech srpen zr rjen listopad prosinec Danish august september oktober november december Dutch augustus september oktober november december Finnish elokuu syyskuu lokakuu marraskuu joulukuu French aot septembre octobre novembre dcembre German August September Oktober November Dezember Hungarian augusztus szeptember oktber november december Icelandic gst september oktber nvember desember Italian agosto settembre ottobre novembre dicembre Norwegian august september oktober november desember Polish sierpien wrzesien pazdziernik listopad grudzien Portuguese agosto setembro outubro novembro dezembro Spanish agosto septiembre octubre noviembre diciembre Swedish augusti september oktober november december Turkish agustos eyll ekim kasim aralik >

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

=+1. Who produces your service/product?

Answered: 1 week ago