similar to: USING @IF FUNCTIONS ?

Displaying 20 results from an estimated 3000 matches similar to: "USING @IF FUNCTIONS ?"

2010 Dec 24
1
Running scripts in hadoop
R-help group, I'm looking for some assistance on using an R-script to read STDIN from hadoop. Example, say I have two tables. One is a student table, the other is a class roster table (tables join on student_id). Student SAT score is in the student table, whether the student passed or not is in the roster table. So to determine if a student passed or failed based on their SAT score, I'd
2011 Nov 07
2
Problem working with dates
Hello All, I've been reading books about R for awhile now and am in the process of replicating the SAS analyses from an old report. I want to be sure that I can do all the things I need to in R before using it in my daily work. So far, I've managed to read in all my data and have done some data manipulation. I'm having trouble with fixing an error in a date variable though, and was
2010 Feb 23
1
Problem with strptime generating missing values where none appear to exist
Dear R Helpers, I am having difficulty with strptime. I wish to find the differences between two vectors of times. I have apparently no difficulty to convert the vectors to the appropriate format using strptime. But, then difftime does not calculate all the differences. Here is the code and output:- dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100
2011 May 19
1
update_attributes updates data from second instance of nested form but not the first
Got a weird situation with an update put to a controller with a form with nested attributes. On the data below, I am updating data for both items (''0'' and ''1'') in rosters_attributes (in the example below I am updating the ''name'' attribute to a new value in both cases. What I am stuck on is that ''1'' gets its data updated,
2012 Jul 11
3
unable to subtract dates in R
Hi, I wanted to calculate the age of people in my dataset by subtracting the individual's date of birth from their intake into a program. After several hours, searches of help archives, and the downloading of lubiridate, I have had no luck with this. Below is the code I used. > intakeDS$DOB <- as.character(intakeDS$DOB) > intakeDS$DOB <- as.Date(intakeDS$DOB,
2005 Dec 18
13
calculate age based on DoB
Hi, I wrote a little helper that calulates someone''s age based on his/her date of birth. def age(dob) diff = Date.today - dob age = (diff / 365.25).floor age.to_s end It works fine, but it''s not completely accurate as it just takes the average days in a year. It should be able to calculate this more accurately, right? I can''t work it out
2012 Nov 06
1
pivot table
Hello, I have a data which looks like below: Some of the patients have multiple diagnosis. ID(200 patients)   Diag (100 unique Diag-200 in general)   Proc (50 uniqe Proc)  DOB (200)   Gender (200)    a                           daig1 b                           diag2 c                            diag1 I want to reformat this data to : ID   diag1 diag 2 diag 3..  diagx   proc1   proc2  
2010 Aug 16
1
How can I read date format '02-Jan-02' ?
Hello, I am trying to read a database exported from SAS. It is form of csv, and the date format reads '02-Feb-99'. I used following code to convert character to date format, db$dob<-as.Date(db$dob, format="%d-%b-%y"). but it doesn't work, only seems NA. What's wrong with this code? Thank you in advance. Best, Dong-Hee Koh [[alternative HTML version deleted]]
2012 Sep 13
1
Parsing "back" to API strcuture
Dear R experts, I'm reading data from an online database via API and it gets delivered in this messy comma separated structure, > RAW.API <-
2018 Oct 18
2
After updating to 16 "Some non-required modules failed to load"
I just noticed this upon startup since updating from 15.6.1 to 16.0.0 - do any of these matter? [Oct 18 12:12:18] WARNING[4489]: loader.c:2228 load_modules: Some non-required modules failed to load. [Oct 18 12:12:18] ERROR[4489]: loader.c:2243 load_modules: res_pjsip_transport_websocket declined to load. [Oct 18 12:12:18] ERROR[4489]: loader.c:2243 load_modules: cdr_sqlite3_custom declined to
2010 Feb 18
3
row indexes from logical statment
Is there any easy way to pull out the row indexes for a logical matching statment? #################example code######################################### foo <- data.frame(name=c(rep("A", 25), rep("B", 25), rep("C", 25), rep("A", 25)), stuff=rnorm(100), and=rnorm(100), things=rnorm(100)) #this is what I want but I would like the row indexes
2010 Dec 10
2
Remove 100 years from a date object
Hello, I have some data that has dates in the form 27.02.37. I convert them to a date object as follows: as.Date(data$date,format="%d.%m.%y") But this gives me years such as 2037 when I would like them to be 1937. I thought of trying to take off some time i.e. as.Date(camCD$DoB,format="%d.%m.%y") - 100*365 But that doesn't seem to work out correctly. Any ideas how to
2003 Jun 30
1
date to age
I have files which have columns of data that look like this: DOB 9/27/1964 ... That is, dates in month/day/year format. When variables like DOB are read in, they are converted to factors. So, I wrote this to convert from date to age in years: age<-function(x) {as.numeric(Sys.time()-strptime(as.character(x),format="%m/%d/%Y"))/365.25} This isn't very precise or pretty, but it
2012 Oct 08
2
converting DOB format to age
Hi, I have a column of DOB in mm/dd/yyyy. I want to convert this format to age. Thanks a lot.   Best,Farnoosh Sheikhi [[alternative HTML version deleted]]
2024 Mar 26
1
core & cosine schema items in Samba AD DC user object?
On Tue, 26 Mar 2024 14:50:41 +0100 Franta Hanzl?k <franta at hanzlici.cz> wrote: > On Tue, 26 Mar 2024 08:01:27 +0000 > Rowland Penny via samba <samba at lists.samba.org> wrote: > > > On Tue, 26 Mar 2024 02:57:51 +0100 > > Franta Hanzl?k via samba <samba at lists.samba.org> wrote: > > > > > Please, it is possible (perhaps with some Samba
2006 Jan 20
3
postgres db setup
All of the tutorials and the Agile book use MySQL and I''ve got that working. I am now trying to use PostgreSQL and can''t seem to get going. Is my problem the db setup in postgresql? I have installed postgres-pr The error message when I try to access http://localhost:3000/clients when using PostgreSQL (MySQL works fine) ActiveRecord::StatementInvalid (RuntimeError: ERROR
2010 Feb 28
6
A slight trap in read.table/read.csv.
I had occasion recently to read in a one-line *.csv file that looked like: "CandidateName","NSN","Ethnicity","dob","gender" "Smith, Mary Jane",111222333,"E","2/25/1989","F" That "F" (for female) in the last field got transformed to FALSE. Apparently read.csv (and hence read.table) are inferring
2008 Aug 06
3
Help in running Stata dataset in R
Dear All, I installed R 2.7.0 and tried to call a dataset i had ealier own called on R2.6.2 but i keep on getting an error: use("maltreat.dta") Error in fromchar(x) : character string is not in a standard unambiguous format Tried doing the same with R2.7.1 but i get the same error. However if i call the same on R 2.6.2, there is no error: use("maltreat.dta") > des()
2016 Jun 11
4
[RFC] LLVM Coroutines
On Fri, Jun 10, 2016 at 5:25 PM, Gor Nishanov <gornishanov at gmail.com> wrote: > Hi Eli: > > >> Naively, you would expect that it would be legal to hoist the store... > >> but that breaks your coroutine semantics because the global could be > mutated > >> between the first return and the resume. > > Hmmm... I don't see the problem. I think
2006 Jun 08
9
find :order =>
Hi, I have the following find statment @client_pages, @clients = paginate :clients, :per_page => 20, :order => "organisation_id, surname" currently im ordering by organisation_id however I need to order by the field in the organisation table organisations.name how can this be done? Thanks Scott -- Posted via http://www.ruby-forum.com/.