similar to: Converting matrix to data frame without losing an assigned dimname

Displaying 20 results from an estimated 1000 matches similar to: "Converting matrix to data frame without losing an assigned dimname"

2006 Mar 28
3
Brand newbie question relating to link_to
I recently dived into Rails and am having trouble with the link_to method. I''d like to pass some parameters to the action being called and am not sure how to do it. Essentially, I want to hyperlink a total count of bugs queried from the database to a method that will return the bug numbers when clicked on. I have a method, bug_total, that returns the total number to display in the
2009 Nov 04
1
odfweave table styles
Hello List, Does anyone have examples of custom formatting of tables in odfweave? I know there is an example of this in the formatting.odt file that comes with the package, but running that through odfweave gives the following error: Error: chunk 13 (label=showTableStyles) Error in names(x) <- value : 'names' attribute [1] must be the same length as the vector [0] What I am really
2007 Jun 14
4
How to convert a table to JSON (or to Javascript array)
Is there a way to retrieve an HTML table in javascript and convert it to JSON using prototype? I''m stumped :( phil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2009 Aug 12
4
paste first row string onto every string in column
Hi, I am trying to edit a data frame such that the string in the first line is appended onto the beginning of each element in the subsequent rows. The data looks like this: > df V1 V2 V3 V4 1 DPA1* DPA1* DPB1* DPB1* 2 0103 0104 0401 0601 3 0103 0103 0301 0402 . . and what I want is this: >dfnew V1 V2 V3 V4 1 DPA1* DPA1* DPB1* DPB1* 2 DPA1*0103
2008 Jan 24
2
boxplot axis labelling
Hi, i'm very new to R, so sorry for what i'm sure is a very basic question. I'm producing a boxplot with the data below: df3<-data.frame( x=c(10,11,115,12,13,14,16,17,18,21,22,23,24,26,27,28,29,3,30,32,33,34,35,4,4 1,45,5,50,52,56,58,6,67,6738,68,7,8,9), fq=c(8,11,1,2,4,4,2,2,6,3,4,2,2,1,1,1,4,51,3,1,1,1,1,35,1,1,19,2,1,1,1,14,1, 1,1,10,13,5),
2002 Mar 12
1
RArcInfo Package, get.bnddata()
I am having trouble using get.bnddata() in the RArcInfo package. I installed the version 0.2 binary of the package for Windows and am using R 1.4.1 on Windows NT 4.0. I have had no problems importing and plotting arc data with get.arcdata() and plotarc(). plotpal() also works fine. I've been able to use get.arcdata(), get.labdata(), get.paldata(), get.tablenames(), get.tablefields(),
2017 Nov 01
3
Adding Records to a Table in R
Dear R friends, I am currently working with time series data, and I have a table(as data frame) that has looks like this (TransitDate are in format = "%e-%B-%Y") : TransitDate Transits CargoTons 1985-04-01 100 2500 1985-05-01 135 4500 1985-06-01 120 1750 1985-07-01 100 3750 1985-08-01 200
2010 Apr 21
2
Table to List Transformation Scenario
I have a series of tables, one for each environment indicating a date (row) and a sample at each hour of the day (0 to 23) Test1 Table: Date,Hour1,Hour2,...Hour23 1/1/10,123,123,...,123 I would like to model this as a time series but how can I translate the table into a list such that I can get: 1/1/10 00:00, 123 1/1/10 01:00, 123 1/1/10 02:00, 123 ... 1/1/10 23:00, 123 Any suggestions on how
2017 Nov 01
0
Adding Records to a Table in R
Hi Paul, #First I set up some sample data since I don't have a copy of your data dtOrig <- as.Date( c("1985-04-01","1985-07-01","1985-12-01","1986-04-01")) dfOrig <- data.frame( TransitDate=dtOrig, Transits=c(100,100,500,325), CargoTons=c(1000,1080,3785,4200) ) #Generate the complete set of dates as a data frame dfDates<- data.frame(
2008 May 03
1
recode involving a count rule
Hello, R-helpers. I have a data frame below called df. I want to add a variable c, based on the following logic: if df$a < 5 then the first two times this condition is met place a 1 in c, the next two times this condition is met place a 2 in c and when the condition is not met let c equal df$b. The result would look like, dfnew, shown below. a <- rep(c(3,5,7), 4) b <- rep(c(NA,1,2),
2002 Nov 21
0
Re: RArcInfo question(basic=T, newbie=T, annoying=T)
Dear Steve, I'll post your question also to the R-help mailing list since I think this can help to other RArcInfo users. As I mentioned in the last release of the package, I have a tutorial nearly finished. I hope to release it in the next days. > I have downloaded an .e00 file of 2000 Census Tracts for the southern US > State of Georgia, and I'm wondering which steps I need to go
2017 Nov 08
3
Adding Records to a Table in R
Dear Eric, Hope you are doing great. I also tried the following: #First I created the complete date sequence TransitDateFrame <- data.frame(TransitDate=seq(as.Date(dataset1[1,1]), as.Date(dataset1[nrow(dataset1),1]), by = "month")) #Then I did the merging dataset1NEW <- merge(TransitDateFrame, dataset1, by="TransitDate", all.x=TRUE) Now it has, as expected the
2010 Feb 17
3
Extending data frame with longer columns
Hi, I am a beginner in R and have only read a few chapters in the R book, I was not able to find a solution for this simple problem. I have an empty data frame: a=data.frame(name="test") which I would like to extend in a for-loop (with data extracted from a database). Ideally I would like to extend the data frame like this: a["new_1"] = 1:10 a["new_1"] = 1:12
2010 Feb 19
3
Plotting multiple table automatically
Hi All, I have a slight issue getting R to plot a series of tables automatically. Essentially I have a series of tables that I wish to plot. They are named on_2, on_3 etc. based on the file name when they were read in. I have filelist <- list.files() to give me list of the table names. I wish to plot each table, so I was thinking along some kind of for loop as below: for (i in 1:Number_Files)
2011 Jan 16
3
transform a df with a condition
Dear all, for each A == 3 in 'df' I would like to change the variables B and K. My result should be the whole df and not the subset (A==3)... df <- data.frame(A = c(1,1,3,2,2,3,3), B = c(2,1,1,2,7,8,7), K = c("a.1", "d.2", "f.3", "a.1", "k.4", "f.9",
2017 Nov 08
0
Adding Records to a Table in R
Hi Instead of attachments copy directly result of dput(TransitDateFrame) and dput(dataset1) to your email. Or, if your data have more than about 20 rows you could copy only part of it. dput(TransitDateFrame[,1:20]) dput(dataset1[,1:20]) Only with this approach we can evaluate your data in all aspects and provide correct answer. Cheers Petr > -----Original Message----- > From: R-help
2011 Jan 25
1
subsetting based on joint values of critera
Dear colleagues, I have a dataset that looks as below. I would like to make a new dataset that excludes the cases which are joint conjunctions of particular state names and years, so Connecticut and 2010, Maryland and 2010 and Vermont and 2010. I'm trying the following subset code: newdata<- subset(bpa, (!State=="Connecticut" & year<"2010")) It appears that
2002 Dec 18
1
samba to samba via LDAP
Hi all, I have lots of samba servers and want them to all authenticate against a single password file which will be a LDAP database. Where I want to be: Login to a domain called "FROST" that passes the username:passwd to a domain called "ACR" which checks LDAP. Where I'm at: I can login (from a W2K machine) to a test server called LIBIT which uses LDAP
2008 Jun 03
1
Model simplification using anova()
Hello all, I've become confused by the output produced by a call to anova(model1,model2). First a brief background. My model used to predict final tree height is summarised here: Df Sum Sq Mean Sq F value Pr(>F) Treatment 2 748.35 374.17 21.3096 7.123e-06 *** HeightInitial 1 0.31 0.31 0.0178 0.89519
2006 Feb 28
3
error on installation
My system: Suse 9.3 Prof. I downloaded Wine: wine-0.9.7-SuSELinux100.i586.rpm. I get the message libstdc++.so.6 not available. What can I do? Please note: I am not a linux expert. What little I know, I acquired by myself. Regards, suren -- The woods are lovely dark and deep But I have promises to keep And miles to go before I sleep And miles to go before I sleep (Robert Frost)