\begin{circuit}0

%Capacitor
\cc \nl \C1 {$C$} d
\- 3 d \P1

\atpin C1t
\- 3 u \P2
\- 5 l \P3


% resistor
\- 2 d
\nl \cc \spring1 {$R$} d
\vtopin P1

% Fuente de corriente
\atpin P3
\- 5 l
\- 2 d
\nl \varI1 {$i$} d

%Cierre del circuito
\vtopin P1
\htopin P1

\frompin varI1t \shift -1.5 0  % corriente de la fuente
\cc\nl \whatI1 {} d d
\vtopin varI1b

% Corriente capacitor
\frompin C1b \shift -1.5 -2
\nl \whatI1 {$i_C$} d u
\vtopin C1t
\- 1 u

%corriente resistor
\frompin spring1b \shift -1.2 0.4
\nl \whatI1 {$i_R$} d u
\vtopin spring1t

% Tension capacitor
\atpin C1t \shift 0.5 0
\put{$+$}

\atpin C1b \shift 0.5 -0.5
\put{$-$}

% Tension resistor
\atpin spring1t \shift 0.5 0
\put{$+$}

\atpin spring1b \shift 0.5 -0.5
\put{$-$}


\end{circuit}