You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: man/truelength.Rd
+1-18Lines changed: 1 addition & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ alloc.col(DT,
44
44
\code{setalloccol} \emph{reallocates} \code{DT} by reference. This may be useful for efficiency if you know you are about to going to add a lot of columns in a loop.
45
45
It also returns the new \code{DT}, for convenience in compound queries.
46
46
}
47
-
\seealso{ \code{\link{copy}}, See the FAQ vignette: \code{vignette("datatable-faq", package = "data.table")}.}
47
+
\seealso{ \code{\link{copy}}}
48
48
\examples{
49
49
DT = data.table(a=1:3,b=4:6)
50
50
length(DT) # 2 column pointer slots used
@@ -54,22 +54,5 @@ length(DT) # 2 used
54
54
truelength(DT) # 2050 allocated, 2048 free
55
55
DT[,c:=7L] # add new column by assigning to spare slot
56
56
truelength(DT)-length(DT) # 2047 slots spare
57
-
58
-
# FAQ: Dealing with data.table loaded from RDS or RData files
59
-
# Example to demonstrate the usage of setDT after loading from RDS
60
-
# Step 1: Define a temporary file path
61
-
rds_file <- tempfile("my_data.rds_")
62
-
# Step 2: Create and save data.table if the file does not exist
63
-
X <- data.table(a = 1:5, b = letters[1:5]) # Create a data.table
0 commit comments