similar to: export dataframe's column classes to a list

Displaying 20 results from an estimated 80 matches similar to: "export dataframe's column classes to a list"

2009 Oct 14
6
Reinstantiate controller during functional testing
... ok, I may be going about this the wrong way, or perhaps, a less efficient way than is optimal, but I would like to test a little bit of AJAX on one of my web pages. When I test this by hand, I bring up the page which shows a select box, I select an item from the drop down list, see another select box show up, go back to the first select box, select a different item, and see something
2010 May 20
1
finding euclidean proximate points in two datasets
Hello all, I've been pouring through the various spatial packages, but haven't come across the right thing yet. Given a set of points in 2-d space X, i'm trying to find the subset of points in Y proximate to each point in X. Furthermore, the proximity threshold of each point in X differs (X$threshold). I've constructed this myself already, but it's horrificly slow with a
2023 Jun 11
2
Problem with filling dataframe's column
Dear R users; I am trying to fill a column based on a specific value in another column of a dataframe, but it seems there is a problem with the codes! The "Layer" and the "LU" are two different columns of the dataframe. How can I fix this? Sincerely for (i in 1:nrow(data2$Layer)){ if (data2$Layer == "Level 12") { data2$LU == "Park"
2023 Jun 11
1
Problem with filling dataframe's column
?s 21:05 de 11/06/2023, javad bayat escreveu: > Dear R users; > I am trying to fill a column based on a specific value in another column of > a dataframe, but it seems there is a problem with the codes! > The "Layer" and the "LU" are two different columns of the dataframe. > How can I fix this? > Sincerely > > > for (i in 1:nrow(data2$Layer)){ >
2023 Jun 11
1
Problem with filling dataframe's column
Dear Rui; Many thanks for your email. I used one of your codes, "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works correctly for me. Actually I need to expand the codes so as to consider all "Levels" in the "Layer" column. There are more than hundred levels in the Layer column. If I use your provided code, I have to write it
2007 Aug 30
2
How to multiply all dataframe rows by another dataframe's columns
Hello, I have two data frames, X and Y, with two columns each and different numbers of rows. # creation of data frame X Loc1.alleles <- c(1,5,6,7,8) Loc1.Freq <- c(0.35, 0.15, 0.05, 0.10, 0.35) Loc1 <- cbind( Loc1.alleles,Loc1.Freq) X <- data.frame(Loc1) #creation of data frame Y Loc2.alleles <- c(1,4,6,8) Loc2.Freq <- c(0.35, 0.35,
2023 Jun 11
1
Problem with filling dataframe's column
?s 22:54 de 11/06/2023, javad bayat escreveu: > Dear Rui; > Many thanks for your email. I used one of your codes, > "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works > correctly for me. > Actually I need to expand the codes so as to consider all "Levels" in the > "Layer" column. There are more than hundred
2009 Jul 20
1
a complicated merging task
I would like to merge two dataframes, but i have a condition that needs to used for the merge as well. the rows (observations) in each dataframe are identified by each person's ID and by the date of the observation. Basically I would like it to be merged based on both ID (exact match) and date (a condition where one dataframe's date must be after the other dataframe's date).
2004 Aug 16
2
extract a row
Hello there, Using 1.9.0 on WinXP... I have a data frame, one column of which is named "rate". The column has text entries like "fast", "medium", "slow", "very slow", and so forth. I have not tried to make them factors, but maybe R did this automatically. Anyway, I would like to display on the console rows that meet a rate criterion. So I want
2009 Jun 29
2
How to select partially (not completely) unique rows?
Dear R-helpers, I know how to use unique to select unique rows, e.g. unique.rows<-unique(dataframe) but I would like to select those rows that are unique only only TWO of my dataframe's columns (so, two rows with the same value on these two columns would not be kept, even if they had different values in other columns). For example, I have a dataframe with 10 columns, two of which are
2006 Feb 14
2
How to handle large dataframes?
Dear all I imported a Stata .dta file with the read.dta-function from the foreign-package. The dataframe's dimensions are > dim(d.apc) [1] 15806 1300 Importing needs up to 15 min and calculations with these data are rather slow (although I subset the data before starting analyses). My questions are: 1. Has someone experiences importing Stata files (alternatives to read.dta) ? 2.
2006 Feb 25
2
Adding header lines to a dataframe that is exported using write.csv
I would like to export a dataframe to a .csv using: >write.csv(dataframe,"dataframe.csv") but I need to add four "header" lines to the csv that are not part of the dataframe (which itself has a line of column headers). The difficulty (for me, at least!) lies in the requirement that certain elements of the header (X, Y and the number of "Q"s - please see example
2006 Jun 24
4
session alternatives
I have a web application that is getting larger all the time. There are now 3 separate models where I am storing the current find parameters in session hash and it''s beginning to seem to me that this might not be a good idea. Before I add another model to the mess - is there a better way? Do I have to create some table to store the current ''find'' criteria? It seems as
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
Hi Gabriel, thanks for your detailed explanation, that definitely clarifies the design choices that were made in setting up the ALTREP framework and I can see how those choices make sure existing code won't break. My specific use-case for wanting to check whether a vector is an ALTREP is the following: the fst package wraps an external C++ library (fstlib, independent from R) that was made
2010 Apr 05
2
changing column names in a dataframe
Hi folks, I have imported data from an Excel spreadsheet. Columns in that spreadsheet are named "name", "x", and "y", and several sets of those columns appear in the worksheet. For example: name x y name x y test1 1 3 test2 4 4 test1 2 2 test2 5 5 test1 3 1 test2 6 6 When I import these data into R, into a dataframe, I end up with something like this:
2012 Jan 24
1
Splitting up large set of survey data into categories
Hi, I am a total newbie to R so I apologize if the answer to my question is too obvious. I a data set of the following form: Date V1 V... VN Region Industry 22/03/1995 23:01:12 1 3 2 15 A 21/03/1995 21:01:12 3 3 1 9 C 1/04/1995 17:01:06 3 2 1 3 B
2019 Jun 04
2
[External] undefined symbol errors when compiling package using ALTREP API
thanks for clearing that up, so these methods are actually not meant to be exported on Windows and OSX? Some of the ALTREP methods that now use 'attribute_hidden' would be very useful to packages that aim to be ALTREP aware, should the currently (exported) API be considered final? thanks for your time & best, Mark On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at
2001 Dec 19
2
How to create a data.frame "like" another, but longer?
Hello, does anyone know of a quick way to create a data frame "like" another, but with more rows? What I'd like to do is this: if mydata is a data.frame like a b c 1 TRUE yes 2 FALSE no 3 TRUE yes I'd like to get mydata2 with the same column names and column types, but without the values and with more rows. All I could think of was to manually do
2019 Jun 05
0
[External] undefined symbol errors when compiling package using ALTREP API
For now you can use R_altrep_inherits(x, R_compact_intseq_class) The variable R_compact_intseq_class should currently be visible to packages on all platforms, though that may change if we eventually provide a string-based lookup mechanism, e.g. somehting like R_find_altrep_class("compact_intseq", "base") Best, luke On Tue, 4 Jun 2019, Mark Klik wrote: > Hi Gabriel,
2006 Mar 13
6
lame newbie question: how to pass instance variables
This should be obvious - but I''m a long-time non-web app programmer and new to rails. I simply want to put something in a variable in one action and access it in another. It''s like this, I''m doing a simple photo gallery/managment app, and I have two actions in my picture_controller: The first one scans the picture directory and creates a new object in the pictures