<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_r(df, f, sep=",", index_join="@", columns_join="."):
 """ Export dataframe in a format easily importable to R Index fields are joined with "@" and column fields by "." by default. :param df: :param f: :param index_join: :param columns_join: :return: """


    df = df.copy()
    df.index = ["@".join([str(s) for s in v]) for v in df.index.values]
    df.columns = [".".join([str(s) for s in v]) for v in df.index.values]
    df.to_csv(f, sep=sep)