Displaying 20 results from an estimated 1000 matches similar to: "Loop in variable names"
2011 Feb 14
1
R not working after loading lattice
Hello!
Happy Valentine's Day...
After I loaded the package lattice in R, it did not work. Then when I closed R and restarted it, R started with an error message and here is the feedback that I got from the R Console:
Loading required package: Hmisc
Loading required package: survival
Loading required package: stats
Loading required package: graphics
Loading required package: splines
Error in
2011 Apr 15
2
Function for deleting variables with >=50% missing obs from a data frame
Hello R users!
I have several data frames where some of the variables have many missing observations. For example, Q1 in one of my data frames has over 66% of its observations missing. I have tried imputation with mice but it does not work for all the data frames and I get the following message or a similar message to this:
iter imp variable
1 1 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11
2011 Mar 18
2
How do I delete multiple blank variables from a data frame?
Dear List Members,I have 55 data frames, each of which with 272 variables and 267 observations. Some of these variables are blanks but the blanks are not the same for every data frame. I would like to write a procedure in which I import a data frame, see which variables are blank, and delete those variables. My data frames have variables named P1 to P136 and Q1 to Q136.
I have a couple of
2017 Oct 19
1
looping using 'diverse' package measures
Hi everyone,
I'm new at R (although I'm a Stata user for some time and somehow
proficient in it) and I'm trying to use the 'diverse' R package to compute
a few diversity measures on a sample of firms for a period of about 10
years. I was wondering if you can give me some hints on how to best proceed
on using the 'diverse' package.
My sample has the following setup.
2011 Jun 24
4
What does class "call" mean? How do I make class "formula" into a "call"?
I have a list called "tabs" that I would like to have the same structure as my list "eqSystem." The two look like they have the same format but they are different because when I look at their attributes, class(eqSystem[[1]]) is "call" but class(tabs[[1]]) is "formula". I want to have class(tabs[[1]]) as a call too. So what does "call" mean? And how
2005 Dec 22
3
foreign_key setting ignored
I''m having a spot of bother creating a ''has_many'' relationship between
two legacy database tables. The relationship is ''company'' table has many
linked records in the ''contact'' table. Iv''e used ''generate scaffold'' on
these tables and everything is fine. I then decided to define the
relationship in the
2010 Apr 07
3
match function or "=="
Hi all,
I have a huge dataset(5000k observations), which contains the daily sales
for each company.
If I want to find out the a company with unique company id number, which
function I should use that is more efficient, match or "=="? For example,
use<-dataset[!is.na(match(dataset$companyID, 12345)),]
or
use<-dataset[dataset$companyID==12345,]
Thank you very much.
--
View this
2011 Jun 21
1
Setting up list of many equations for systemfit
Dear List Members,I am trying to set up a large system of equations and I am trying to find a simple way to set up the list command under the package system fit. Here is the example from system fit and what I am trying to do:
EQ1 <- Y1 ~ X1 + X2 + X4EQ2 <- Y2 ~ X2 + X3EQ3 <- Y3 ~ X2 + X3 + X4EQ4 <- Y4 ~ X1 + X3 + X4eqSystem <-list(form1 = EQ1, form2 = EQ2, form3 = EQ3, form4 = EQ4)
2011 Apr 19
1
Subsetting a data frame by dropping correlated variables
Hello R Users!
I have a data frame that has many variables, some with missing observations, and some that are correlated with each other. I would like to subset the data by dropping one of the variables that is correlated with another variable that I will keep int he data frame. Alternatively, I could also drop both the variables that are correlated with each other. Worry not! I am not deleting
2010 Jun 01
2
Help on aggregate method
Dear R experts,
I would really appreciate if you had an idea on how to use more
efficiently the aggregate method:
More specifically, I would like to calculate the mean of certain
values on a data frame,? grouped by various attributes, and then
create a new column in the data frame that will have the corresponding
mean for every row. I attach part of my code:
matchMean <-
2017 Oct 19
1
looping using 'diverse' package measures
Hi everyone,
I'm new at R (although I'm a Stata user for some time and somehow
proficient in it) and I'm trying to use the 'diverse' R package to compute
a few diversity measures on a sample of firms for a period of about 10
years. I was wondering if you can give me some hints on how to best proceed
on using the 'diverse' package.
My sample has the following setup.
2011 Apr 07
1
df with max function applied to 6 lags of a variable?!?
Hello everyone!
I have a data frame of 136 variables with 270 observations. I would like to create a new data frame such that each element of that data frame contains the maximum value of the 6 prior lags of the initial data frame. So for example, if my original data frame, A, were
A1=c(7.72, 7.94, 7.56, 7.54, 0.93, 0.59, 7.21, 8.00, 7.19, 7.57)A2=c(4.27, 3.70, 3.80, 3.67, 3.83, 3.95, 4.02, 2.06,
2011 Apr 08
1
Package mice: Error in if (meth[j] != "") { : argument is of length zero
Dear R users,
I am using package mice and I am getting the error "
Error in if (meth[j] != "") { : argument is of length zero." I have tried using several different versions of R (even the one that will be coming out this month) to no avail. I am using RStudio as my interface with R. Also note that I had run this a couple of days ago and it was working fine; I can't,
2011 Apr 13
1
Overcoming warning in package zoo
Dear R users,I have a long program that I am trying to run--I am using RStudio as my interface with R. The pieces of the program run well individually but when I try to run everything in sequence it bogs down because of a warning after using rollmax from package zoo. Here is the warning:
"In rollmax.zoo(zoo(Pmat), 7, na.pad = FALSE, align = "right") : na.pad is deprecated. Use
2012 Apr 26
0
Mac users: Textbucket scripts for puppet types
Hi Gang,
If you''re a mac user and haven''t heard of text bucket, but find yourself typing the same things semi-often.. you might want to check it out.
http://bassetsoftware.com/b.cgi/textbucket/index
I started using it about 9 months ago when someone showed me klypper on linux and I went searching for something similar… Anyways, where was I?
oh yeah right:
I''ve cobbled
2009 Feb 28
5
object ".trPaths" not found
I am running an R script with Tinn-R (2.2.0.1) and I get the error message
Error in source(.trPaths[4], echo = TRUE, max.deparse.length = 150) :
object ".trPaths" not found
Any solutions?
Thank you.
Kevin
2011 Apr 01
0
package MICE, squeeze function, calling several variables at once
Hello everyone!I have a data set with missing observations that I am trying to impute. I am using MICE and I would like the imputed values to all be positive. I have two types of variables: prices (P1 to P136) and quantities (Q1 to Q136) and I also want the range of these two types to be different. Besides these variables. I am using the squeeze function but I am unable to set it such that I
2008 Sep 14
5
Error Running TinnR with R
Hello All,
I am using Tinn-R (v 2.0.0.7) integrated with R (v 2.7.2) on a 32-bit
Windows Vista system.
When I try to run a code and send it to R from Tinn-R, I get the following
error message;
?Error in source(.trPaths[5], echo = T) : object ".trPaths" not found?
I was using an earlier version of Tinn-R and R and I was not having problems
till recently when R-sending started freezing
2011 Aug 04
1
Tinn-R problem: unable to send code to R
The problem mentioned in the 06 Dec 2010 email below still occurs with
Tinn-R (v.2.3.7.1) when highlighting a string of code, copying to the
clipboard, and trying to send to Rgui via Shift+Ctrl+Q.
I can copy 1 line of code to the clipboard and send it to Rgui with
Shift+CTRL+Q. This fails with 2 or more lines of code, generating the
error:
Error in source(.trPaths[5], echo = TRUE,
2019 May 30
0
macOS Notes.app IMAP Syncing Not Working
* Ralph, Steven Smith via dovecot:
> > The issue is that macOS Note.app does not sync with this server.
> I'm syncing macOS Mojave's Notes.app with Dovecot without problems, so
> it can be done. Have you made sure that you activated both mail and
> notes in macOS' Internet Accounts preferences for this particular IMAP
> account? If so, is that IMAP account listed in