Let $E$ be a subset of $\mathbb{R}$ and let $f$ be a continuous function defined on $E$. Is it true that $f$ can always be extended to a function $\tilde{f}$ defined on $\mathbb{R}$, which is still continuous on $E$? I know that we cannot ask $\tilde{f}$ be to continuous on all $\mathbb{R}$, which is shown by the following example: Does every continuous map from $\mathbb{Q}$ to $\mathbb{Q}$ extends continuously as a map from $\mathbb{R}$ to $\mathbb{R}$?
Thank you in advance!
Edit: I wanted ask if $\tilde{f}$ could be continuous at every point of $E$. I hope it's clearer phrased this way!
Edit2: From comments. For example, if $E=\{0\}$, then $f$ with $f(0)=0$ is continuous. If we define $\tilde{f}(x)=1$ for $x\in\mathbb{R}\backslash\{0\}$ (and $\tilde{f}(x)=f(x)$ for $x\in E$), then the restriction of $\tilde{f}$ to $E$ is continouous but $\tilde{f}$ is not continuous at $0$.