search for: dfnames

Displaying 19 results from an estimated 19 matches for "dfnames".

Did you mean: ifnames
2010 May 20
1
sqldf: issues with natural joins
Hello, I'm having trouble discovering what's going wrong with my use of natural joins via sqldf. Following the instructions under 4i at http://code.google.com/p/sqldf/, which discusses creating indices to speed joins, I have been only unreliably able to get natural joins to work. For example, > Tid <- c('AES 01-01-02 10:58:00', 'AES 01-01-02 11:53:00', 'AES
2014 Jun 24
2
using C code to create data frame but always return as list
there is my code,  expect return value  is a data frame but R say it is list: SEXP Julia_R_MD_NA_DataFrame(jl_value_t* Var) {  SEXP ans,names,rownames;  char evalcmd[4096];  int i;  const char* dfname="DataFrameName0tmp";  jl_set_global(jl_main_module, jl_symbol(dfname), (jl_value_t*)Var);  //Get Frame cols   sprintf(evalcmd,"size(%s,2)",dfname);  jl_value_t*
2003 Oct 16
2
returning dynamic variable names from function
...uot;*.dat;*.Dat")) numFiles <- length(fullFileNames) fileNames <- basename(fullFileNames) # removes the all the paths from the full filenames splitNames <- strsplit(fileNames,"_") # create a "list" of strings separated by the "_" character dfNames <- sapply(splitNames,"[",1) # or I could use "sapply(splitNames, function (x) x[1])" OR EVEN "unlist(lapply(splitNames, function(x)x[1]))" -- [Thanks to Andy Liaw, Simon Blomberg, Gabor Grothendieck, #James Holtman and Robert Keefe for their helpful respon...
2009 Jun 12
1
Extracting the name of an object
With apologies if I missed the answer in the response given to my previous question. How do I extract the name of an object and assign it to a string variable? For example, I have a dataframe named comnoglyc How do I assign this name to a variable dfname such that print(dfname) returns "comnoglyc"? Thank you very much. Payam [[alternative HTML version deleted]]
2013 Jan 18
2
A smart way to use "$" in data frame
Hello all, I have a data frame dataa: newdate newstate newid newbalance newaccounts 1 31DEC2001 AR 1 1170 61 2 31DEC2001 VA 2 4565 54 3 31DEC2001 WA 3 2726 35 4 31DEC2001 AR 3 2700 35 The following gives me the balance of state AR:
2007 Oct 01
3
mean of subset of rows
Dear list, this must be an easy one: I have a data.frame of two columns, "ID" with four different levels (A to D) and numerical "size", and each of the 4 different IDs is repeated a different number of times. I would like to get the mean size for each ID as another data.frame. I have tried the following: >ID= as.character(unique(data[,1])) # I use unique() because
2004 Sep 09
2
Handling the windows clipboard/32KB limit
(R 1.9.1; Windows 2000;) I'm just comparing ease of use, speed, etc for methods of transferring data frames in the Excel, MySQL, R triangle. It turns out that going from Excel to R (when doing this carefully). Using the clipboard is actually quite fast and efficient (2 seconds for transferring 120 000 cells on a common desktop computer as compared to much longer for going the RODBC route,
2004 Dec 29
3
using get() in assign()
I'm trying to rename the columns in a list of data.frames using the following... for(i in 1:length(filenames)) { assign(names(get(filenames[i])), c("name", "infood", "time") ) } R returns no errors, but the names are unchanged in the data.frames. The original names were things like > names(get(filenames[2])) [1] "Tc45w4.V1" "Tc45w4.V2"
2013 May 22
1
column width in .dbf files using write.dbf ... to be continued
...tor(x)) dataframe[[i]] <- if (factor2char) as.character(x) else as.integer(x) else if (inherits(x, "Date")) dataframe[[i]] <- format(x, "%Y%m%d") } precision <- integer(m) scale <- integer(m) dfnames <- names(dataframe) for (i in seq_len(m)) { nlen <- nchar(dfnames[i], "b") x <- dataframe[, i] if (is.logical(x)) { precision[i] <- 1L scale[i] <- 0L } else if (is.integer(x)) { rx <- rang...
2009 Nov 16
8
extracting the last row of each group in a data frame
Hi, I would like to extract the last row of each group in a data frame. The data frame is as follows Name Value A 1 A 2 A 3 B 4 B 8 C 2 D 3 I would like to get a data frame as Name Value A 3 B 8 C 2 D 3 Thank you for your suggestions in advance Jeff
2009 Jun 12
3
Referencing data frames
Hi, How do I use the string content of a string variable to reference a data frame of the same name? I want to do the typical tasks of 1) building a name with a string variable and using the string variable to create a data frame (or any object) whose name is the string value of the variable and 2) pass on a string to a function as a parameter, and then use that string to refer to an existing
2010 Jan 13
1
column width in .dbf files using write.dbf ... to be continued
...tor(x)) dataframe[[i]] <- if (factor2char) as.character(x) else as.integer(x) else if (inherits(x, "Date")) dataframe[[i]] <- format(x, "%Y%m%d") } precision <- integer(m) scale <- integer(m) dfnames <- names(dataframe) for (i in seq_len(m)) { nlen <- nchar(dfnames[i], "b") x <- dataframe[, i] if (is.logical(x)) { precision[i] <- 1L scale[i] <- 0L } else if (is.integer(x)) { rx <- range(x...
2008 Mar 03
3
looping through data frames in a workspace
All, I have a workspace containing only data frame objects. I would like to loop though each one and clean-up text columns in them. How can I have R loop through the list? I have tried to find an answer in R help but the closest solution I can find is to make a static list of data frames, as illustrated in this recent post: ---------begin post On Tuesday 19 February 2008 (19:51:15), TLowe wrote:
2004 Nov 01
2
stacking imported data
Hi all, I have a question that I don't have a good answer for (note the word "good"; I have an answer, but I consider it not "good"). Take the following data in a single tab-delimited text file: <text> A Labels Value SE 2.5% 97.5% R90 0.231787 1.148044 0.035074 1.531779 R0 0.500861 0.604406 0.185336 1.353552 B Labels Value SE 2.5% 97.5% (Intercept) 1.367514
2009 Nov 02
1
Using processed objects as arguments of a function
Dear R users, I wish to utilise processed and saved objects as arguments of a function. Specifically, I have created objects using *"assign"* & *"paste"* functions with an incremental index i, the names of the objects are: fund1, fund2, fund3,....., fund80,..... (where the numerical value increments according to the index i & class of these objects are
2010 Feb 23
5
export tables to Excel files
Dear R users, I've just posted a similar question about Illustrator. This time I would like to export the results of my statistic tables and my dataframes into Excel files. Up to now I've used write.csv(), but I have to resave every file in .xls in Excel. I would like to know if there is a function or package to export directly into *.xls. I have found xlsReadWrite which would be
2010 Jul 02
2
Files with Missing Data
I'm a new R user so this is possibly a naive question. I'm trying to load an external CSV file into a dataframe using: df_name<-read.table("myfile.csv") myfile.csv should have 5 elements per row, though a percentage are missing the last two elements (the commas are present as placemarkers). However, R does not create the dataset but returns the message: line 1
2010 Sep 16
2
shuffling of data
I have a file that reads like this: Species,Year,Julian_day Alnus_glutinosa, 1873, 123 Sorbus_aucuparia, 1873, 122 ....(more species...) Alnus_glutinosa, 1874, 134 Sorbus_aucuparia, 1874, 143 ....(more species and years) Is there a way to plot this as julian day over years so that each species get a different color? Also is it possible to convert this data into the format: Alnus_glutinosa,
2009 Oct 28
3
variable labels to accompany data.frame
Often it is useful to keep a "codebook" to document the contents of a dataset. (By "dataset" I mean a rectangular structure such as a dataframe.) The codebook has as many rows as the dataset has columns (variables, fields). The columns (fields) of the codebook may include: ? variable name ? type (character, factor, integer, etc) ? variable label