Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /inst/@dataframe/private/df_matassign.m [afaced] .. [591ef1] Maximize Restore

  Switch to side-by-side view

--- a/inst/@dataframe/private/df_matassign.m
+++ b/inst/@dataframe/private/df_matassign.m
@@ -66,7 +66,7 @@
       endif     
       df._ridx(indr, :, :) = [];
       %# to remove a line, iterate on each column
-      df._data = cellfun (@(x) feval(@subsasgn, x, S, []), \
+      df._data = cellfun (@(x) feval(@subsasgn, x, S, []), ...
                           df._data, "UniformOutPut", false);
       if (isa (indr, 'char'))
         df._cnt(1) = 0;
@@ -121,18 +121,18 @@
   ridx = []; cname = rname; ctype = rname;
   
   if (iscell (RHS))
-    if ((length (indc) == df._cnt(2) && size (RHS, 2) >=  df._cnt(2)) \
+    if ((length (indc) == df._cnt(2) && size (RHS, 2) >=  df._cnt(2)) ...
         || 0 == df._cnt(2) || isempty (S.subs{1}) || isempty (S.subs{2}))
       %# providing too much information -- remove extra content
       if (size (RHS, 1) > 1)
         %# at this stage, verify that the first line doesn't contain
         %# chars only; use them for column names
-        dummy = cellfun ('class', \
-                         RHS(1, ~cellfun ('isempty', RHS(1, :))), \
+        dummy = cellfun ('class', ...
+                         RHS(1, ~cellfun ('isempty', RHS(1, :))), ...
                          'UniformOutput', false);
         dummy = strcmp (dummy, 'char');
         if (all (dummy))
-          if (length (df._over{2}) >= max (indc) \
+          if (length (df._over{2}) >= max (indc) ...
               && ~all (df._over{2}(indc)) && ~isempty (S.subs{2}))
             warning("Trying to overwrite colum names");
           endif
@@ -156,12 +156,12 @@
         endif
         %# at this stage, verify that the first line doesn't contain
         %# chars only; use them for column types
-        dummy = cellfun ('class', \
-                         RHS(1, ~cellfun ('isempty', RHS(1, :))), \
+        dummy = cellfun ('class', ...
+                         RHS(1, ~cellfun ('isempty', RHS(1, :))), ...
                          'UniformOutput', false);
         dummy = strcmp (dummy, 'char');
         if (all (dummy))
-          if (length (df._over{2}) >= max (indc) \
+          if (length (df._over{2}) >= max (indc) ...
               && ~all (df._over{2}(indc)))
             warning ("Trying to overwrite colum names");
           endif
@@ -180,7 +180,7 @@
       %# more elements than df width -- try to use the first two as
       %# row index and/or row name
       if (size (RHS, 1) > 1)
-        dummy = all (cellfun ('isnumeric', \
+        dummy = all (cellfun ('isnumeric', ...
                               RHS(~cellfun ('isempty', RHS(:, 1)), 1)));
       else
         dummy =  isnumeric(RHS{1, 1});
@@ -211,13 +211,13 @@
       if (size (RHS, 2) >  df._cnt(2))
         %# verify the the first row doesn't contain chars only, use them
         %# for row names
-        dummy = cellfun ('class', \
-                         RHS(~cellfun ('isempty', RHS(:, 1)), 1), \
+        dummy = cellfun ('class', ...
+                         RHS(~cellfun ('isempty', RHS(:, 1)), 1), ...
                          'UniformOutput', false);
-        dummy = strcmp (dummy, 'char') \
+        dummy = strcmp (dummy, 'char') ...
             && (~isempty (cname) && size (cname{1}, 2) < 1);
         if (all (dummy)) 
-          if (length (df._over{1}) >= max (indr) \
+          if (length (df._over{1}) >= max (indr) ...
               && ~all (df._over{1}(indr)))
             warning("Trying to overwrite row names");
           else
@@ -324,7 +324,7 @@
           if (size (RHS, 1) <= 1)
             switch df._type{indc(indi)}
               case {'char' } %# use a cell array to hold strings
-                dummy = cellfun (@num2str, RHS(:, indj), \
+                dummy = cellfun (@num2str, RHS(:, indj), ...
                                  'UniformOutput', false);
               case {'double' }
                 dummy = fillfunc (indj);
@@ -338,7 +338,7 @@
             dummy = [];
             switch (df._type{indc(indi)})
               case {'char' } %# use a cell array to hold strings
-                dummy = cellfun (@num2str, RHS(:, indj), \
+                dummy = cellfun (@num2str, RHS(:, indj), ...
                                  'UniformOutput', false);
               case {'double' }
                 dummy(idxOK, :) = fillfunc (indj); dummy(~idxOK, :) = NA;
@@ -373,8 +373,8 @@
               endif
             endfor
           else
-            dummy = \
-                sprintf ("Assignement failed for colum %d, of type %s and length %d,\nwith new content\n%s", \
+            dummy = ...
+                sprintf ("Assignement failed for colum %d, of type %s and length %d,\nwith new content\n%s", ...
                          indj, df._type{indc(indi)}, length (indr), disp (RHS(:, indj)));
             error (dummy);
           endif
@@ -388,7 +388,7 @@
         try     
           switch (df._type{indc(indi)})
             case {'char' } %# use a cell array to hold strings
-              dummy(indr, 1) = cellfun(@num2str, RHS(:, indj), \
+              dummy(indr, 1) = cellfun(@num2str, RHS(:, indj), ...
                                        'UniformOutput', false);
             case {'double' }
               dummy(indr, :) = fillfunc (indj);
@@ -396,8 +396,8 @@
               dummy(indr, :) = cast(fillfunc (indj), df._type{indc(indi)});
           endswitch
         catch
-          dummy = \
-              sprintf ("Assignement failed for colum %d, of type %s and length %d,\nwith new content\n%s", \
+          dummy = ...
+              sprintf ("Assignement failed for colum %d, of type %s and length %d,\nwith new content\n%s", ...
                        indj, df._type{indc(indi)}, length (indr), disp (RHS(:, indj)));
           error (dummy);
         end_try_catch
@@ -409,13 +409,13 @@
   else 
     %# RHS is either a numeric, either a df
     if (any (indc > min (size (df._data, 2), df._cnt(2))))
-      df = df_pad(df, 2, max (indc-min (size (df._data, 2), df._cnt(2))),\
+      df = df_pad(df, 2, max (indc-min (size (df._data, 2), df._cnt(2))),...
                    class(RHS));
     endif
     if (~isempty (inds) && isnumeric(inds) && any (inds > 1))
       for indi = (1:ncol)
         if (max (inds) > length (df._rep{indc(indi)}))
-          df = df_pad(df, 3, max (inds)-length (df._rep{indc(indi)}), \
+          df = df_pad(df, 3, max (inds)-length (df._rep{indc(indi)}), ...
                       indc(indi));
         endif
       endfor
@@ -433,14 +433,14 @@
         [df, S] = df_cow(df, S, indc(indi));
         if (strcmp (df._type(indc(indi)), RHS._type(indi)))
           try
-            df._data{indc(indi)} = feval (@subsasgn, df._data{indc(indi)}, S, \
+            df._data{indc(indi)} = feval (@subsasgn, df._data{indc(indi)}, S, ...
                                           RHS._data{indi}(:, RHS._rep{indi}));
           catch
             disp (lasterr ()); disp('line 516 ???'); keyboard
           end_try_catch
         else
-          df._data{indc(indi)} = feval (@subsasgn, df._data{indc(indi)}, S, \
-                                        cast (RHS._data{indi}(:, RHS._rep{indi}),\
+          df._data{indc(indi)} = feval (@subsasgn, df._data{indc(indi)}, S, ...
+                                        cast (RHS._data{indi}(:, RHS._rep{indi}),...
                                             df._type(indc(indi))));
         endif
         S = Sorig;
@@ -546,12 +546,12 @@
     df._ridx = dummy;
   endif
   
-  if (~isempty (rname) && (length (df._over{1}) < max (indr) || \
+  if (~isempty (rname) && (length (df._over{1}) < max (indr) || ...
         all (df._over{1}(indr))))
     df._name{1}(indr, 1) = genvarname(rname);
     df._over{1}(1, indr) = false;
   endif
-  if (~isempty (cname) && (length (df._over{2}) < max (indc) || \
+  if (~isempty (cname) && (length (df._over{2}) < max (indc) || ...
         all (df._over{2}(indc))))
     if (length (cname) < ncol)
       cname(end+1:ncol) = {'_'};